diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2004-01-05 17:33:28 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2004-01-05 17:33:28 +0000 |
commit | f16ac7a4821dab60737c8653364fbf443f0f228e (patch) | |
tree | d124e84183032c49e75064cf4ca648e658548bda | |
parent | 94a7e4427ba2b5ab90eb5ef9c437582064966d4a (diff) |
removed some MSVC warnings (level 3)
svn path=/trunk/; revision=9558
-rw-r--r-- | wiretap/erf.c | 6 | ||||
-rw-r--r-- | wiretap/lanalyzer.c | 4 | ||||
-rw-r--r-- | wiretap/libpcap.c | 4 | ||||
-rw-r--r-- | wiretap/network_instruments.c | 4 | ||||
-rw-r--r-- | wiretap/netxray.c | 6 | ||||
-rw-r--r-- | wiretap/snoop.c | 4 | ||||
-rw-r--r-- | wiretap/toshiba.c | 4 | ||||
-rw-r--r-- | wiretap/wtap-int.h | 6 |
8 files changed, 19 insertions, 19 deletions
diff --git a/wiretap/erf.c b/wiretap/erf.c index 491046f88e..57341ac413 100644 --- a/wiretap/erf.c +++ b/wiretap/erf.c @@ -32,7 +32,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * -* $Id: erf.c,v 1.5 2003/12/11 21:23:37 ulfl Exp $ +* $Id: erf.c,v 1.6 2004/01/05 17:33:27 ulfl Exp $ */ /* @@ -320,10 +320,10 @@ static int erf_read_header( #ifdef G_HAVE_GINT64 guint64 ts = pletohll(&erf_header->ts); - phdr->ts.tv_sec = ts >> 32; + phdr->ts.tv_sec = (long) (ts >> 32); ts = ((ts & 0xffffffff) * 1000 * 1000); ts += (ts & 0x80000000) << 1; /* rounding */ - phdr->ts.tv_usec = ts >> 32; + phdr->ts.tv_usec = (long) (ts >> 32); if (phdr->ts.tv_usec >= 1000000) { phdr->ts.tv_usec -= 1000000; phdr->ts.tv_sec += 1; diff --git a/wiretap/lanalyzer.c b/wiretap/lanalyzer.c index 72cde95cac..d3da6f1493 100644 --- a/wiretap/lanalyzer.c +++ b/wiretap/lanalyzer.c @@ -1,6 +1,6 @@ /* lanalyzer.c * - * $Id: lanalyzer.c,v 1.43 2003/12/29 00:25:39 guy Exp $ + * $Id: lanalyzer.c,v 1.44 2004/01/05 17:33:27 ulfl Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -211,7 +211,7 @@ int lanalyzer_open(wtap *wth, int *err) */ cr_day = summary[0]; cr_month = summary[1]; - cr_year = pletohs(&summary[2]); + cr_year = (guint8) pletohs(&summary[2]); /*g_message("Day %d Month %d Year %d (%04X)", cr_day, cr_month, cr_year, cr_year);*/ diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c index b50ab8ccc1..e48c52264b 100644 --- a/wiretap/libpcap.c +++ b/wiretap/libpcap.c @@ -1,6 +1,6 @@ /* libpcap.c * - * $Id: libpcap.c,v 1.105 2003/12/21 12:17:05 ulfl Exp $ + * $Id: libpcap.c,v 1.106 2004/01/05 17:33:27 ulfl Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -1759,7 +1759,7 @@ static gboolean libpcap_dump(wtap_dumper *wdh, } break; } - atm_hdr.vpi = pseudo_header->atm.vpi; + atm_hdr.vpi = (guint8) pseudo_header->atm.vpi; atm_hdr.vci = phtons(&pseudo_header->atm.vci); nwritten = fwrite(&atm_hdr, 1, sizeof atm_hdr, wdh->fh); if (nwritten != sizeof atm_hdr) { diff --git a/wiretap/network_instruments.c b/wiretap/network_instruments.c index dcae840757..594945eebd 100644 --- a/wiretap/network_instruments.c +++ b/wiretap/network_instruments.c @@ -1,5 +1,5 @@ /* - * $Id: network_instruments.c,v 1.5 2003/11/25 05:56:16 guy Exp $ + * $Id: network_instruments.c,v 1.6 2004/01/05 17:33:28 ulfl Exp $ */ /*************************************************************************** @@ -327,7 +327,7 @@ gboolean fill_time_struct(guint64 ns_since2000, observer_time* time_conversion) time_conversion->us_since2000 = ns_since2000/1000; time_conversion->sec_since2000 = ns_since2000/1000000000; - time_conversion->seconds_from_1970 = seconds1970to2000 + time_conversion->sec_since2000; + time_conversion->seconds_from_1970 = (time_t) (seconds1970to2000 + time_conversion->sec_since2000); time_conversion->useconds_from_1970 = ((guint64)seconds1970to2000*1000000)+time_conversion->us_since2000; return TRUE; diff --git a/wiretap/netxray.c b/wiretap/netxray.c index 45f2a9044d..abda330b0f 100644 --- a/wiretap/netxray.c +++ b/wiretap/netxray.c @@ -1,6 +1,6 @@ /* netxray.c * - * $Id: netxray.c,v 1.84 2003/10/01 07:11:48 guy Exp $ + * $Id: netxray.c,v 1.85 2004/01/05 17:33:28 ulfl Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -1176,7 +1176,7 @@ static gboolean netxray_dump_close_1_1(wtap_dumper *wdh, int *err) file_hdr.nframes = htolel(netxray->nframes); file_hdr.start_offset = htolel(CAPTUREFILE_HEADER_SIZE); file_hdr.end_offset = htolel(filelen); - file_hdr.network = htoles(wtap_encap_to_netxray_1_1_encap(wdh->encap)); + file_hdr.network = (guint8) htoles(wtap_encap_to_netxray_1_1_encap(wdh->encap)); file_hdr.timelo = htolel(0); file_hdr.timehi = htolel(0); @@ -1383,7 +1383,7 @@ static gboolean netxray_dump_close_2_0(wtap_dumper *wdh, int *err) file_hdr.nframes = htolel(netxray->nframes); file_hdr.start_offset = htolel(CAPTUREFILE_HEADER_SIZE); file_hdr.end_offset = htolel(filelen); - file_hdr.network = htoles(wtap_encap_to_netxray_2_0_encap(wdh->encap)); + file_hdr.network = (guint8) htoles(wtap_encap_to_netxray_2_0_encap(wdh->encap)); file_hdr.timelo = htolel(0); file_hdr.timehi = htolel(0); switch (wdh->encap) { diff --git a/wiretap/snoop.c b/wiretap/snoop.c index dc781fe69e..2003a4ad5f 100644 --- a/wiretap/snoop.c +++ b/wiretap/snoop.c @@ -1,6 +1,6 @@ /* snoop.c * - * $Id: snoop.c,v 1.66 2003/12/19 22:23:05 guy Exp $ + * $Id: snoop.c,v 1.67 2004/01/05 17:33:28 ulfl Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -849,7 +849,7 @@ static gboolean snoop_dump(wtap_dumper *wdh, } break; } - atm_hdr.vpi = pseudo_header->atm.vpi; + atm_hdr.vpi = (guint8) pseudo_header->atm.vpi; atm_hdr.vci = g_htons(pseudo_header->atm.vci); nwritten = fwrite(&atm_hdr, 1, sizeof atm_hdr, wdh->fh); if (nwritten != sizeof atm_hdr) { diff --git a/wiretap/toshiba.c b/wiretap/toshiba.c index 064d5d969f..68370ecaa6 100644 --- a/wiretap/toshiba.c +++ b/wiretap/toshiba.c @@ -1,6 +1,6 @@ /* toshiba.c * - * $Id: toshiba.c,v 1.27 2003/10/01 07:11:48 guy Exp $ + * $Id: toshiba.c,v 1.28 2004/01/05 17:33:28 ulfl Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -353,7 +353,7 @@ parse_toshiba_rec_hdr(wtap *wth, FILE_T fh, if (wth) wth->phdr.pkt_encap = WTAP_ENCAP_ISDN; pseudo_header->isdn.uton = (direction[0] == 'T'); - pseudo_header->isdn.channel = + pseudo_header->isdn.channel = (guint8) strtol(&channel[1], NULL, 10); break; diff --git a/wiretap/wtap-int.h b/wiretap/wtap-int.h index d812c6300f..53fe4e59fe 100644 --- a/wiretap/wtap-int.h +++ b/wiretap/wtap-int.h @@ -1,6 +1,6 @@ /* wtap-int.h * - * $Id: wtap-int.h,v 1.42 2003/11/06 22:45:28 guy Exp $ + * $Id: wtap-int.h,v 1.43 2004/01/05 17:33:28 ulfl Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -338,7 +338,7 @@ struct wtap_dumper { { \ int _bytes_read; \ _bytes_read = file_read((target), 1, (num_bytes), (fh)); \ - if (_bytes_read != (num_bytes)) { \ + if (_bytes_read != (int) (num_bytes)) { \ *(err) = file_error((fh)); \ return FALSE; \ } \ @@ -350,7 +350,7 @@ struct wtap_dumper { { \ int _bytes_read; \ _bytes_read = file_read((target), 1, (num_bytes), (fh)); \ - if (_bytes_read != (num_bytes)) { \ + if (_bytes_read != (int) (num_bytes)) { \ *(err) = file_error((fh)); \ if (*(err) == 0 && _bytes_read > 0) { \ *(err) = WTAP_ERR_SHORT_READ; \ |