Ethereal-dev: [Ethereal-dev] Assigning -1 to unsigned int

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Albert Chin <ethereal-dev@xxxxxxxxxxxxxxxxxx>
Date: Mon, 25 Feb 2002 01:37:34 -0600
packet-icq.c from 0.9.1 has lines like:
  919: guint16 x1 = -1;
  964: guint32 uin = -1;
  1304: unsigned char num = -1;
  1391: guint16 pktLen = -1;
  ...

The Solaris C compiler complains with:
  cc -DHAVE_CONFIG_H -I. -I. -I.   -I. -I./wiretap
  -I/opt/TWWfsw/libpcap07/include -I/opt/TWWfsw/zlib11/include
  -I/opt/TWWfsw/ucdsnmp423/include  -mr -Qn -xstrconst -xO2
  -xtarget=generic -I. -I./wiretap -I/opt/TWWfsw/gtk+12/include/gtk-1.2
  -I/opt/TWWfsw/glib12/include/glib-1.2
  -I/opt/TWWfsw/glib12/lib/glib/include -I/usr/openwin/include
  -I/opt/TWWfsw/ucdsnmp423/include -c packet-icq.c
  "packet-icq.c", line 919: warning: initializer does not fit or is
  out of range: -1
  "packet-icq.c", line 964: warning: initializer does not fit or is
  out of range: -1
  "packet-icq.c", line 1304: warning: initializer does not fit or is
  out of range: -1
  "packet-icq.c", line 1391: warning: initializer does not fit or is
  out of range: -1
  "packet-icq.c", line 1499: warning: initializer does not fit or is
  out of range: -1
  "packet-icq.c", line 1500: warning: initializer does not fit or is
  out of range: -1
  "packet-icq.c", line 1586: warning: initializer does not fit or is
  out of range: -1
  "packet-icq.c", line 1587: warning: initializer does not fit or is
  out of range: -1
  "packet-icq.c", line 1588: warning: initializer does not fit or is
  out of range: -1
  "packet-icq.c", line 1589: warning: initializer does not fit or is
  out of range: -1
  "packet-icq.c", line 1590: warning: initializer does not fit or is
  out of range: -1
  "packet-icq.c", line 1591: warning: initializer does not fit or is
  out of range: -1
  "packet-icq.c", line 1633: warning: initializer does not fit or is
  out of range: -1
  "packet-icq.c", line 1635: warning: initializer does not fit or is
  out of range: -1
  "packet-icq.c", line 1637: warning: initializer does not fit or is
  out of range: -1

-- 
albert chin (china@xxxxxxxxxxxxxxxxxx)