diff options
-rw-r--r-- | wiretap/file_access.c | 4 | ||||
-rw-r--r-- | wiretap/iseries.c | 8 | ||||
-rw-r--r-- | wiretap/k12.c | 4 | ||||
-rw-r--r-- | wiretap/lanalyzer.c | 2 | ||||
-rw-r--r-- | wiretap/mpeg.c | 6 | ||||
-rw-r--r-- | wiretap/netmon.c | 2 | ||||
-rw-r--r-- | wiretap/netscreen.c | 2 | ||||
-rw-r--r-- | wiretap/network_instruments.c | 4 | ||||
-rw-r--r-- | wiretap/wtap-int.h | 4 |
9 files changed, 18 insertions, 18 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c index 4d325357e3..dea358fdff 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -998,11 +998,11 @@ static FILE *wtap_dump_file_fdopen(wtap_dumper *wdh _U_, int fd) #endif /* internally writing raw bytes (compressed or not) */ -size_t wtap_dump_file_write(wtap_dumper *wdh, const void *buf, unsigned bufsize) +size_t wtap_dump_file_write(wtap_dumper *wdh, const void *buf, size_t bufsize) { #ifdef HAVE_LIBZ if(wdh->compressed) { - return gzwrite(wdh->fh, buf, bufsize); + return gzwrite(wdh->fh, buf, (unsigned) bufsize); } else #endif { diff --git a/wiretap/iseries.c b/wiretap/iseries.c index b5a202ab2b..eb786f9cf9 100644 --- a/wiretap/iseries.c +++ b/wiretap/iseries.c @@ -393,7 +393,7 @@ iseries_seek_next_packet (wtap * wth, int *err) else { /* Else buflen is just length of the ASCII string */ - buflen = strlen (buf); + buflen = (long) strlen (buf); } /* If packet header found return the offset */ if (strncmp (buf + 80, ISERIES_PKT_MAGIC_STR, ISERIES_PKT_MAGIC_LEN) @@ -623,7 +623,7 @@ iseries_parse_packet (wtap * wth, FILE_T fh, else { /* Else bytes to rewind is just length of ASCII string */ - buflen = strlen (data); + buflen = (int) strlen (data); } /* If this is a IP header hex string then set flag */ @@ -768,12 +768,12 @@ iseries_parse_packet (wtap * wth, FILE_T fh, buffer_assure_space (wth->frame_buffer, ISERIES_MAX_PACKET_LEN); buf = buffer_start_ptr (wth->frame_buffer); /* Convert ascii data to binary and return in the frame buffer */ - iseries_parse_hex_string (asciibuf, buf, strlen (asciibuf)); + iseries_parse_hex_string (asciibuf, buf, (int) strlen (asciibuf)); } else { /* Convert ascii data to binary and return in the frame buffer */ - iseries_parse_hex_string (asciibuf, pd, strlen (asciibuf)); + iseries_parse_hex_string (asciibuf, pd, (int) strlen (asciibuf)); } /* free buffers allocs and return */ diff --git a/wiretap/k12.c b/wiretap/k12.c index 2c28835673..5c735c5fef 100644 --- a/wiretap/k12.c +++ b/wiretap/k12.c @@ -832,8 +832,8 @@ static void k12_dump_src_setting(gpointer k _U_, gpointer v, gpointer p) { } obj.record.unk16_1 = g_htons(0x0000); - obj.record.name_len = strlen(src_desc->input_name) + 1; - obj.record.stack_len = strlen(src_desc->stack_file) + 1; + obj.record.name_len = (guint16) strlen(src_desc->input_name) + 1; + obj.record.stack_len = (guint16) strlen(src_desc->stack_file) + 1; obj.record.extra.type = g_htonl(src_desc->input_type); diff --git a/wiretap/lanalyzer.c b/wiretap/lanalyzer.c index a70dc24427..1621772c6f 100644 --- a/wiretap/lanalyzer.c +++ b/wiretap/lanalyzer.c @@ -455,7 +455,7 @@ static int swrite(const void* what, guint size, FILE *hd) * Returns 0 or error * Write one block with error control *---------------------------------------------------*/ -static int s0write(guint cnt, FILE *hd) +static int s0write(size_t cnt, FILE *hd) { static guint8 z64[64]; size_t nwritten; diff --git a/wiretap/mpeg.c b/wiretap/mpeg.c index fcecacea18..8ce82a3af7 100644 --- a/wiretap/mpeg.c +++ b/wiretap/mpeg.c @@ -48,11 +48,11 @@ #define PES_PREFIX 1 #define PES_VALID(n) (((n) >> 8 & 0xffffff) == PES_PREFIX) -static size_t +static int mpeg_resync(wtap *wth, int *err, gchar **err_info _U_) { gint64 offset = file_tell(wth->fh); - size_t count = 0; + int count = 0; int byte = file_getc(wth->fh); while (byte != EOF) { @@ -113,7 +113,7 @@ mpeg_read(wtap *wth, int *err, gchar **err_info _U_, { guint32 n; int bytes_read = mpeg_read_header(wth, err, err_info, &n); - unsigned packet_size; + unsigned int packet_size; struct wtap_nstime ts = wth->capture.mpeg->now; if (bytes_read == -1) diff --git a/wiretap/netmon.c b/wiretap/netmon.c index c09f54c1aa..985a8c9f9e 100644 --- a/wiretap/netmon.c +++ b/wiretap/netmon.c @@ -778,7 +778,7 @@ static gboolean netmon_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, netmon->frame_table[netmon->frame_table_index] = htolel(netmon->frame_table_offset); netmon->frame_table_index++; - netmon->frame_table_offset += hdr_size + phdr->caplen + atm_hdrsize; + netmon->frame_table_offset += (int) hdr_size + phdr->caplen + atm_hdrsize; return TRUE; } diff --git a/wiretap/netscreen.c b/wiretap/netscreen.c index 5e33180543..0e376c223f 100644 --- a/wiretap/netscreen.c +++ b/wiretap/netscreen.c @@ -164,7 +164,7 @@ static gboolean netscreen_check_file_type(wtap *wth, int *err) for (line = 0; line < NETSCREEN_HEADER_LINES_TO_CHECK; line++) { if (file_gets(buf, NETSCREEN_LINE_LENGTH, wth->fh) != NULL) { - reclen = strlen(buf); + reclen = (guint) strlen(buf); if (reclen < strlen(NETSCREEN_HDR_MAGIC_STR1) || reclen < strlen(NETSCREEN_HDR_MAGIC_STR2)) { continue; diff --git a/wiretap/network_instruments.c b/wiretap/network_instruments.c index edddba315e..f8e63bc35e 100644 --- a/wiretap/network_instruments.c +++ b/wiretap/network_instruments.c @@ -499,7 +499,7 @@ gboolean network_instruments_dump_open(wtap_dumper *wdh, gboolean cant_seek, int } memset(&file_header, 0x00, sizeof(capture_file_header)); g_strlcpy(file_header.observer_version, network_instruments_magic, 32); - file_header.offset_to_first_packet = sizeof(capture_file_header) + sizeof(tlv_header) + strlen(comment); + file_header.offset_to_first_packet = (guint16) (sizeof(capture_file_header) + sizeof(tlv_header) + strlen(comment)); file_header.offset_to_first_packet = GUINT16_TO_LE(file_header.offset_to_first_packet); file_header.number_of_information_elements = 1; if(!fwrite(&file_header, sizeof(capture_file_header), 1, wdh->fh)) { @@ -509,7 +509,7 @@ gboolean network_instruments_dump_open(wtap_dumper *wdh, gboolean cant_seek, int /* create the comment entry */ comment_header.type = GUINT16_TO_LE(INFORMATION_TYPE_COMMENT); - comment_header.length = sizeof(tlv_header) + strlen(comment); + comment_header.length = (guint16) (sizeof(tlv_header) + strlen(comment)); comment_header.length = GUINT16_TO_LE(comment_header.length); if(!fwrite(&comment_header, sizeof(tlv_header), 1, wdh->fh)) { *err = errno; diff --git a/wiretap/wtap-int.h b/wiretap/wtap-int.h index 757703c298..c6f07a39f8 100644 --- a/wiretap/wtap-int.h +++ b/wiretap/wtap-int.h @@ -54,7 +54,7 @@ typedef struct { } ngsniffer_comp_stream_t; typedef struct { - char *sdate; /* Packet start date */ + char *sdate; /* Packet start date */ gboolean tcp_formatted; /* TCP/IP data formated Y/N */ int format; /* Trace format type */ } iseries_t; @@ -276,7 +276,7 @@ struct wtap_dumper { * e.g. WTAP_FILE_TSPREC_USEC */ }; -extern size_t wtap_dump_file_write(wtap_dumper *wdh, const void *buf, unsigned bufsize); +extern size_t wtap_dump_file_write(wtap_dumper *wdh, const void *buf, size_t bufsize); extern int wtap_dump_file_ferror(wtap_dumper *wdh); extern gint wtap_num_file_types; |