Fix the rest of the signed/unsigned comparison warnings.
svn path=/trunk/; revision=4088
This commit is contained in:
parent
038da8730a
commit
6de396c4a8
|
@ -1,7 +1,7 @@
|
|||
/* capture.c
|
||||
* Routines for packet capture windows
|
||||
*
|
||||
* $Id: capture.c,v 1.155 2001/10/25 08:06:15 guy Exp $
|
||||
* $Id: capture.c,v 1.156 2001/10/26 18:28:15 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -1058,7 +1058,7 @@ pipe_open_live(char *pipename, struct pcap_hdr *hdr, loop_data *ld, char *ebuf)
|
|||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
while (bytes_read < sizeof(struct pcap_hdr))
|
||||
while ((unsigned) bytes_read < sizeof(struct pcap_hdr))
|
||||
{
|
||||
b = read(fd, ((char *)&hdr)+bytes_read, sizeof(struct pcap_hdr) - bytes_read);
|
||||
if (b <= 0) {
|
||||
|
@ -1125,7 +1125,7 @@ pipe_dispatch(int fd, loop_data *ld, struct pcap_hdr *hdr)
|
|||
ld->go = FALSE;
|
||||
return 0;
|
||||
}
|
||||
while (bytes_read < rechdr.hdr.incl_len)
|
||||
while ((unsigned) bytes_read < rechdr.hdr.incl_len)
|
||||
{
|
||||
b = read(fd, pd+bytes_read, rechdr.hdr.incl_len - bytes_read);
|
||||
if (b <= 0) {
|
||||
|
|
6
file.c
6
file.c
|
@ -1,7 +1,7 @@
|
|||
/* file.c
|
||||
* File I/O routines
|
||||
*
|
||||
* $Id: file.c,v 1.245 2001/10/04 08:30:33 guy Exp $
|
||||
* $Id: file.c,v 1.246 2001/10/26 18:28:15 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -699,8 +699,8 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
|
|||
/* If it's greater than the current elapsed time, set the elapsed time
|
||||
to it (we check for "greater than" so as not to be confused by
|
||||
time moving backwards). */
|
||||
if (cf->esec < fdata->rel_secs
|
||||
|| (cf->esec == fdata->rel_secs && cf->eusec < fdata->rel_usecs)) {
|
||||
if ((gint32)cf->esec < fdata->rel_secs
|
||||
|| ((gint32)cf->esec == fdata->rel_secs && (gint32)cf->eusec < fdata->rel_usecs)) {
|
||||
cf->esec = fdata->rel_secs;
|
||||
cf->eusec = fdata->rel_usecs;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for gnutella dissection
|
||||
* Copyright 2001, B. Johannessen <bob@havoq.com>
|
||||
*
|
||||
* $Id: packet-gnutella.c,v 1.6 2001/10/26 02:09:01 gram Exp $
|
||||
* $Id: packet-gnutella.c,v 1.7 2001/10/26 18:28:16 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -94,7 +94,7 @@ static int hf_gnutella_push_port = -1;
|
|||
|
||||
static gint ett_gnutella = -1;
|
||||
|
||||
static void dissect_gnutella_pong(tvbuff_t *tvb, int offset, proto_tree *tree, int size) {
|
||||
static void dissect_gnutella_pong(tvbuff_t *tvb, guint offset, proto_tree *tree, guint size) {
|
||||
|
||||
if(offset + size > tvb_length(tvb)) {
|
||||
proto_tree_add_item(tree,
|
||||
|
@ -136,7 +136,7 @@ static void dissect_gnutella_pong(tvbuff_t *tvb, int offset, proto_tree *tree, i
|
|||
|
||||
}
|
||||
|
||||
static void dissect_gnutella_query(tvbuff_t *tvb, int offset, proto_tree *tree, int size) {
|
||||
static void dissect_gnutella_query(tvbuff_t *tvb, guint offset, proto_tree *tree, guint size) {
|
||||
|
||||
if(offset + size > tvb_length(tvb)) {
|
||||
proto_tree_add_item(tree,
|
||||
|
@ -172,7 +172,7 @@ static void dissect_gnutella_query(tvbuff_t *tvb, int offset, proto_tree *tree,
|
|||
}
|
||||
}
|
||||
|
||||
static void dissect_gnutella_queryhit(tvbuff_t *tvb, int offset, proto_tree *tree, int size) {
|
||||
static void dissect_gnutella_queryhit(tvbuff_t *tvb, guint offset, proto_tree *tree, guint size) {
|
||||
|
||||
proto_tree *qhi, *hit_tree;
|
||||
int hit_count, i;
|
||||
|
@ -329,7 +329,7 @@ static void dissect_gnutella_queryhit(tvbuff_t *tvb, int offset, proto_tree *tre
|
|||
|
||||
}
|
||||
|
||||
static void dissect_gnutella_push(tvbuff_t *tvb, int offset, proto_tree *tree, int size) {
|
||||
static void dissect_gnutella_push(tvbuff_t *tvb, guint offset, proto_tree *tree, guint size) {
|
||||
|
||||
if(offset + size > tvb_length(tvb)) {
|
||||
proto_tree_add_item(tree,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-ipv6.c
|
||||
* Routines for IPv6 packet disassembly
|
||||
*
|
||||
* $Id: packet-ipv6.c,v 1.63 2001/09/30 23:07:12 guy Exp $
|
||||
* $Id: packet-ipv6.c,v 1.64 2001/10/26 18:28:16 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -126,7 +126,7 @@ ipv6_reassemble_init(void)
|
|||
static int
|
||||
dissect_routing6(tvbuff_t *tvb, int offset, proto_tree *tree) {
|
||||
struct ip6_rthdr rt;
|
||||
int len;
|
||||
guint len;
|
||||
proto_tree *rthdr_tree;
|
||||
proto_item *ti;
|
||||
char buf[sizeof(struct ip6_rthdr0) + sizeof(struct e_in6_addr) * 23];
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Wes Hardaker (c) 2000
|
||||
* wjhardaker@ucdavis.edu
|
||||
*
|
||||
* $Id: packet-kerberos.c,v 1.16 2001/04/15 08:50:37 guy Exp $
|
||||
* $Id: packet-kerberos.c,v 1.17 2001/10/26 18:28:16 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -548,10 +548,11 @@ dissect_kerberos_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
ASN1_SCK asn1, *asn1p = &asn1;
|
||||
proto_item *item = NULL;
|
||||
|
||||
guint length;
|
||||
gint length;
|
||||
guint cls, con, tag;
|
||||
gboolean def;
|
||||
guint item_len, total_len;
|
||||
gint item_len;
|
||||
guint total_len;
|
||||
int start, end, message_end, sequence_end;
|
||||
|
||||
int ret;
|
||||
|
@ -1263,11 +1264,12 @@ dissect_Ticket(char *title, ASN1_SCK *asn1p, packet_info *pinfo,
|
|||
|
||||
int start;
|
||||
guint cls, con, tag;
|
||||
guint header_len, item_len, total_len;
|
||||
guint header_len, total_len;
|
||||
gint item_len;
|
||||
int ret;
|
||||
|
||||
proto_item *item = NULL;
|
||||
guint length;
|
||||
gint length;
|
||||
gboolean def;
|
||||
guint32 val;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-ldap.c
|
||||
* Routines for ldap packet dissection
|
||||
*
|
||||
* $Id: packet-ldap.c,v 1.27 2001/06/18 02:17:48 guy Exp $
|
||||
* $Id: packet-ldap.c,v 1.28 2001/10/26 18:28:16 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -781,7 +781,7 @@ static int dissect_ldap_request_modifyrdn(ASN1_SCK *a, proto_tree *tree,
|
|||
read_string(a, tree, hf_ldap_message_modrdn_name, 0, 0, ASN1_UNI, ASN1_OTS);
|
||||
read_boolean(a, tree, hf_ldap_message_modrdn_delete, 0, 0);
|
||||
|
||||
if (a->offset < (start + length)) {
|
||||
if (a->offset < (int) (start + length)) {
|
||||
/* LDAP V3 Modify DN operation, with newSuperior */
|
||||
read_string(a, tree, hf_ldap_message_modrdn_superior, 0, 0, ASN1_UNI, ASN1_OTS);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Robert Tsai <rtsai@netapp.com>
|
||||
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
|
||||
*
|
||||
* $Id: packet-rsh.c,v 1.11 2001/06/18 02:17:51 guy Exp $
|
||||
* $Id: packet-rsh.c,v 1.12 2001/10/26 18:28:16 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -68,7 +68,7 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
* the captured data in the packet, so we don't throw
|
||||
* an exception in the "tvb_get_ptr()" call.
|
||||
*/
|
||||
if (linelen > tvb_length(tvb))
|
||||
if (linelen > (int) tvb_length(tvb))
|
||||
linelen = tvb_length(tvb);
|
||||
col_add_str(pinfo->fd, COL_INFO,
|
||||
tvb_format_text(tvb, offset, linelen));
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
|
||||
*
|
||||
* $Id: packet-rsvp.c,v 1.46 2001/06/26 20:50:30 guy Exp $
|
||||
* $Id: packet-rsvp.c,v 1.47 2001/10/26 18:28:16 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -700,7 +700,7 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
offset+1, 1, 1);
|
||||
}
|
||||
cksum = tvb_get_ntohs(tvb, offset+2);
|
||||
if (!pinfo->fragmented && tvb_length(tvb) >= msg_length) {
|
||||
if (!pinfo->fragmented && (int) tvb_length(tvb) >= msg_length) {
|
||||
/* The packet isn't part of a fragmented datagram and isn't
|
||||
truncated, so we can checksum it. */
|
||||
cksum_vec[0].ptr = tvb_get_ptr(tvb, 0, msg_length);
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* Copyright 2000, Heikki Vatiainen <hessu@cs.tut.fi>
|
||||
* Copyright 2001, Jean-Francois Mule <jfm@clarent.com>
|
||||
*
|
||||
* $Id: packet-sip.c,v 1.16 2001/08/23 00:18:56 guy Exp $
|
||||
* $Id: packet-sip.c,v 1.17 2001/10/26 18:28:16 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -135,7 +135,7 @@ static void dissect_sip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
hdr_tree = proto_item_add_subtree(th, ett_sip_hdr);
|
||||
|
||||
/* - 2 since we have a CRLF separating the message-body */
|
||||
while (msg_offset - 2 > offset) {
|
||||
while (msg_offset - 2 > (int) offset) {
|
||||
eol = tvb_find_line_end(tvb, offset, -1, &next_offset);
|
||||
proto_tree_add_text(hdr_tree, tvb, offset, next_offset - offset, "%s",
|
||||
tvb_format_text(tvb, offset, eol));
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for socks versions 4 &5 packet dissection
|
||||
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
|
||||
*
|
||||
* $Id: packet-socks.c,v 1.23 2001/09/03 10:33:07 guy Exp $
|
||||
* $Id: packet-socks.c,v 1.24 2001/10/26 18:28:16 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -297,8 +297,8 @@ static int display_address( const u_char *pd, int offset,
|
|||
|
||||
proto_tree_add_text( tree, NullTVB, offset, 1,
|
||||
"Address Type: %d (%s)", a_type,
|
||||
address_type_table[ MAX( 0, MIN( a_type,
|
||||
array_length( address_type_table)-1))]);
|
||||
address_type_table[ MIN( (guint) a_type,
|
||||
array_length( address_type_table)-1) ]);
|
||||
|
||||
++offset;
|
||||
|
||||
|
@ -416,7 +416,7 @@ static void socks_udp_dissector( const u_char *pd, int offset, frame_data *fd,
|
|||
|
||||
/* set pi src/dst port and call the udp sub-dissector lookup */
|
||||
|
||||
if ( pi.srcport == hash_info->port)
|
||||
if ( pi.srcport == (guint32) hash_info->port)
|
||||
ptr = &pi.destport;
|
||||
else
|
||||
ptr = &pi.srcport;
|
||||
|
@ -562,7 +562,7 @@ void display_socks_v5( const u_char *pd, int offset, frame_data *fd,
|
|||
"Count: %u ", temp);
|
||||
++offset;
|
||||
|
||||
CHECK_PACKET_LENGTH( temp);
|
||||
CHECK_PACKET_LENGTH( (int)temp);
|
||||
|
||||
for( i = 0; i < temp; ++i) {
|
||||
|
||||
|
|
10
packet-x11.c
10
packet-x11.c
|
@ -2,7 +2,7 @@
|
|||
* Routines for X11 dissection
|
||||
* Copyright 2000, Christophe Tronche <ch.tronche@computer.org>
|
||||
*
|
||||
* $Id: packet-x11.c,v 1.23 2001/10/04 00:30:23 guy Exp $
|
||||
* $Id: packet-x11.c,v 1.24 2001/10/26 18:28:16 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -1043,7 +1043,7 @@ static void stringCopy(char *dest, const char *source, int length)
|
|||
static void listOfString8(tvbuff_t *tvb, int hf, int hf_item, int length)
|
||||
{
|
||||
char *s = NULL;
|
||||
int allocated = 0;
|
||||
guint allocated = 0;
|
||||
proto_tree *tt;
|
||||
int i;
|
||||
|
||||
|
@ -1060,7 +1060,7 @@ static void listOfString8(tvbuff_t *tvb, int hf, int hf_item, int length)
|
|||
|
||||
while(length--) {
|
||||
unsigned l = VALUE8(tvb, cur_offset);
|
||||
if (allocated < l + 1) {
|
||||
if (allocated < (l + 1)) {
|
||||
/* g_realloc doesn't work ??? */
|
||||
g_free(s);
|
||||
s = g_malloc(l + 1);
|
||||
|
@ -1103,7 +1103,7 @@ static void string16_with_buffer_preallocated(tvbuff_t *tvb, proto_tree *t,
|
|||
truncated = TRUE;
|
||||
l = STRING16_MAX_DISPLAYED_LENGTH;
|
||||
}
|
||||
if (*sLength < l + 3) {
|
||||
if (*sLength < (int) l + 3) {
|
||||
g_free(*s);
|
||||
*s = g_malloc(l + 3);
|
||||
*sLength = l + 3;
|
||||
|
@ -1163,7 +1163,7 @@ static void listOfTextItem(tvbuff_t *tvb, int hf, int sizeIs16)
|
|||
proto_tree *ttt;
|
||||
gint8 delta = VALUE8(tvb, cur_offset + 1);
|
||||
if (sizeIs16) l += l;
|
||||
if (allocated < l + 1) {
|
||||
if ((unsigned) allocated < l + 1) {
|
||||
/* g_realloc doesn't work ??? */
|
||||
g_free(s);
|
||||
s = g_malloc(l + 1);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Jochen Friedrich <jochen@scram.de>
|
||||
*
|
||||
* $Id: packet-zebra.c,v 1.14 2001/07/16 06:09:02 guy Exp $
|
||||
* $Id: packet-zebra.c,v 1.15 2001/10/26 18:28:16 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -315,7 +315,7 @@ dissect_zebra_request(proto_tree *tree, gboolean request, tvbuff_t *tvb,
|
|||
prefix = tvb_get_ptr(tvb, offset, PSIZE(prefixlen));
|
||||
prefix4 = 0;
|
||||
memcpy(&prefix4, prefix,
|
||||
MIN(PSIZE(prefixlen), sizeof prefix4));
|
||||
MIN((unsigned) PSIZE(prefixlen), sizeof prefix4));
|
||||
proto_tree_add_ipv4(tree, hf_zebra_prefix4,
|
||||
tvb, offset, PSIZE(prefixlen), prefix4);
|
||||
offset += PSIZE(prefixlen);
|
||||
|
@ -393,7 +393,7 @@ dissect_zebra_request(proto_tree *tree, gboolean request, tvbuff_t *tvb,
|
|||
prefix = tvb_get_ptr(tvb, offset, PSIZE(prefixlen));
|
||||
memset(buffer6, '\0', sizeof buffer6);
|
||||
memcpy(buffer6, prefix,
|
||||
MIN(PSIZE(prefixlen), sizeof buffer6));
|
||||
MIN((unsigned) PSIZE(prefixlen), sizeof buffer6));
|
||||
proto_tree_add_ipv6(tree, hf_zebra_prefix6,
|
||||
tvb, offset, PSIZE(prefixlen), buffer6);
|
||||
offset += PSIZE(prefixlen);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* tethereal.c
|
||||
*
|
||||
* $Id: tethereal.c,v 1.94 2001/10/25 06:41:48 guy Exp $
|
||||
* $Id: tethereal.c,v 1.95 2001/10/26 18:28:16 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -1031,8 +1031,8 @@ fill_in_fdata(frame_data *fdata, capture_file *cf,
|
|||
/* If it's greater than the current elapsed time, set the elapsed time
|
||||
to it (we check for "greater than" so as not to be confused by
|
||||
time moving backwards). */
|
||||
if (cf->esec < fdata->rel_secs
|
||||
|| (cf->esec == fdata->rel_secs && cf->eusec < fdata->rel_usecs)) {
|
||||
if ((gint32)cf->esec < fdata->rel_secs
|
||||
|| ((gint32)cf->esec == fdata->rel_secs && (gint32)cf->eusec < fdata->rel_usecs)) {
|
||||
cf->esec = fdata->rel_secs;
|
||||
cf->eusec = fdata->rel_usecs;
|
||||
}
|
||||
|
|
4
util.c
4
util.c
|
@ -1,7 +1,7 @@
|
|||
/* util.c
|
||||
* Utility routines
|
||||
*
|
||||
* $Id: util.c,v 1.52 2001/08/21 06:39:15 guy Exp $
|
||||
* $Id: util.c,v 1.53 2001/10/26 18:28:17 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -401,7 +401,7 @@ get_interface_list(int *err, char *err_str)
|
|||
goto fail;
|
||||
}
|
||||
} else {
|
||||
if (ifc.ifc_len < sizeof(struct ifreq)) {
|
||||
if ((unsigned) ifc.ifc_len < sizeof(struct ifreq)) {
|
||||
sprintf(err_str,
|
||||
"SIOCGIFCONF ioctl gave too small return buffer");
|
||||
goto fail;
|
||||
|
|
Loading…
Reference in New Issue