Ethereal-dev: Re: [Ethereal-dev] Remove compiler warnings by adding #include <string.h>
Thanks, I had not seen those warnings. On what OS and with which compiler
are you compiling?
I'll add the #includes. No, it won't break Windows... MSVC defines memcpy()
etc. in string.h, too.
--gilbert
Craig Rodrigues <rodrigc@xxxxxxxxxxxx> on 11/16/2000 10:15:09 PM
To: ethereal-dev@xxxxxxxxxxxx
cc: (bcc: Gilbert Ramirez/Tivoli Systems)
Subject: [Ethereal-dev] Remove compiler warnings by adding #include
<string.h>
Hi,
I am getting a lot of compiler warnings from the latest CVS version
of Ethereal. A lot of modules are using memcpy/memcmp, but are not
including string.h.
According to the Single Unix Specification, v2 at:
http://www.opengroup.org/onlinepubs/007908799/
memcpy() and memcmp() are in string.h, so that header file must be
included for these functions to be used.
Would it be OK to add the appropriate include in the following files?
Would it break things under Windows?
i4btrace.c:190: warning: implicit declaration of function `memcmp'
nettl.c:93: warning: implicit declaration of function `memcmp'
pppdump.c:334: warning: implicit declaration of function `memcpy'
radcom.c:98: warning: implicit declaration of function `memcmp'
snoop.c:168: warning: implicit declaration of function `memcmp'
column_prefs.c:235: warning: implicit declaration of function `strlen'
packet-arp.c:196: warning: implicit declaration of function `memcpy'
packet-arp.c:197: warning: implicit declaration of function `strcpy'
packet-bootp.c:669: warning: implicit declaration of function `memcpy'
packet-diameter.c:171: warning: implicit declaration of function `strlen'
packet-diameter.c:200: warning: implicit declaration of function `memcpy'
packet-diameter.c:328: warning: implicit declaration of function `strcpy'
packet-fddi.c:256: warning: implicit declaration of function `memcpy'
packet-hsrp.c:101: warning: implicit declaration of function `memcpy'
packet-icp.c:191: warning: implicit declaration of function `memcpy'
packet-ipsec.c:115: warning: implicit declaration of function `memcpy'
packet-ipx.c:568: warning: implicit declaration of function `memcpy'
packet-null.c:180: warning: implicit declaration of function `memcpy'
packet-pim.c:147: warning: implicit declaration of function `strlen'
packet-pim.c:199: warning: implicit declaration of function `memcpy'
packet-radius.c:493: warning: implicit declaration of function `strlen'
packet-radius.c:515: warning: implicit declaration of function `strcpy'
packet-radius.c:645: warning: implicit declaration of function `memcpy'
packet-raw.c:70: warning: implicit declaration of function `memcmp'
packet-rip.c:69: warning: implicit declaration of function `memcpy'
packet-ripng.c:73: warning: implicit declaration of function `memcpy'
packet-tr.c:153: warning: implicit declaration of function `memcmp'
packet-tr.c:347: warning: implicit declaration of function `memcpy'
packet-trmac.c:235: warning: implicit declaration of function `memcpy'
packet-vines.c:95: warning: implicit declaration of function `strcpy'
packet-vines.c:161: warning: implicit declaration of function `memcpy'
packet-wccp.c:294: warning: implicit declaration of function `strcpy'
packet-who.c:117: warning: implicit declaration of function `memcpy'
column.c:236: warning: implicit declaration of function `strlen'
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@xxxxxxxxxxxx
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev