summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2007-03-21 23:14:23 +0000
committerUlf Lamping <ulf.lamping@web.de>2007-03-21 23:14:23 +0000
commit45c8c7a843f1556ea53328378c4cdb27875b99b4 (patch)
tree5b79f14e07fc4b271532d76c6a6a4b74daeb469e
parentd877cbc3949ac7754e30d4c7af6b8cc3e9fd0421 (diff)
downloadwireshark-45c8c7a843f1556ea53328378c4cdb27875b99b4.tar.gz
fix MSVC warnings of / and set CFLAGS to block new warnings
svn path=/trunk/; revision=21098
-rw-r--r--Makefile.nmake2
-rw-r--r--capture_stop_conditions.c2
-rw-r--r--editcap.c2
-rw-r--r--tap-iostat.c8
-rw-r--r--text2pcap.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/Makefile.nmake b/Makefile.nmake
index 6b27cd2ce0..861589957c 100644
--- a/Makefile.nmake
+++ b/Makefile.nmake
@@ -13,7 +13,7 @@ LINK= link
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-CFLAGS=-DHAVE_CONFIG_H $(LOCAL_CFLAGS) $(GLIB_CFLAGS) /I. /Iwiretap \
+CFLAGS=-WX -DHAVE_CONFIG_H $(LOCAL_CFLAGS) $(GLIB_CFLAGS) /I. /Iwiretap \
$(ZLIB_CFLAGS) /I$(PCAP_DIR)\include \
$(NET_SNMP_CFLAGS) \
$(ADNS_CFLAGS) $(PCRE_CFLAGS) $(GNUTLS_CFLAGS) $(LUA_CFLAGS) \
diff --git a/capture_stop_conditions.c b/capture_stop_conditions.c
index 59e44f5d23..02a5aa5251 100644
--- a/capture_stop_conditions.c
+++ b/capture_stop_conditions.c
@@ -119,7 +119,7 @@ static gboolean _cnd_eval_timeout(condition* cnd, va_list ap _U_){
gint32 elapsed_time;
/* check timeout here */
if(data->timeout_s == 0) return FALSE; /* 0 == infinite */
- elapsed_time = time(NULL) - data->start_time;
+ elapsed_time = (gint32) (time(NULL) - data->start_time);
if(elapsed_time > data->timeout_s) return TRUE;
return FALSE;
} /* END _cnd_eval_timeout()*/
diff --git a/editcap.c b/editcap.c
index 58e33e9db8..4084652418 100644
--- a/editcap.c
+++ b/editcap.c
@@ -378,7 +378,7 @@ int main(int argc, char *argv[])
optarg);
exit(1);
}
- srand(time(NULL) + getpid());
+ srand( (unsigned int) (time(NULL) + getpid()) );
break;
case 'F':
diff --git a/tap-iostat.c b/tap-iostat.c
index 758455f006..159ca6ed90 100644
--- a/tap-iostat.c
+++ b/tap-iostat.c
@@ -76,7 +76,7 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void
GPtrArray *gp;
guint i;
- current_time=((pinfo->fd->rel_ts.secs*1000)+(pinfo->fd->rel_ts.nsecs/1000000));
+ current_time=(gint32) ((pinfo->fd->rel_ts.secs*1000)+(pinfo->fd->rel_ts.nsecs/1000000));
/* the prev item before the main one is always the last interval we saw packets for */
it=mit->prev;
@@ -171,7 +171,7 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void
break;
case FT_RELATIVE_TIME:
new_time=fvalue_get(&((field_info *)gp->pdata[i])->value);
- val=new_time->secs*1000+new_time->nsecs/1000000;
+ val=(guint32) (new_time->secs*1000+new_time->nsecs/1000000);
if((it->frames==1)&&(i==0)){
it->counter=val;
} else if(val<it->counter){
@@ -216,7 +216,7 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void
break;
case FT_RELATIVE_TIME:
new_time=fvalue_get(&((field_info *)gp->pdata[i])->value);
- val=new_time->secs*1000+new_time->nsecs/1000000;
+ val=(guint32) (new_time->secs*1000+new_time->nsecs/1000000);
if((it->frames==1)&&(i==0)){
it->counter=val;
} else if(val>it->counter){
@@ -254,7 +254,7 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void
break;
case FT_RELATIVE_TIME:
new_time=fvalue_get(&((field_info *)gp->pdata[i])->value);
- val=new_time->secs*1000+new_time->nsecs/1000000;
+ val=(guint32) (new_time->secs*1000+new_time->nsecs/1000000);
it->counter+=val;
break;
}
diff --git a/text2pcap.c b/text2pcap.c
index b6c270ce5c..ea058f2249 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -1276,7 +1276,7 @@ parse_options (int argc, char *argv[])
output_filename = "Standard output";
}
- ts_sec = time(0); /* initialize to current time */
+ ts_sec = (gint32) time(0); /* initialize to current time */
/* Display summary of our state */
if (!quiet) {