Add a few more GCC warnings on GCC >= 2 for ".devel" builds.

From Neil T. Spring: fixes for many of those warnings:

	addrtoname.c, configure.in: Linux needs netinet/ether.h for
	ether_ntohost

	print-*.c: change char *foo = "bar" to const char *foo = "bar"
	to appease -Wwrite-strings; should affect no run-time behavior.

	print-*.c: make some variables unsigned.

	print-bgp.c: plen ('prefix len') is unsigned, no reason to
	validate by comparing to zero.

	print-cnfp.c, print-rx.c: use intoa, provided by addrtoname,
	instead of inet_ntoa.

	print-domain.c: unsigned int l; (l=foo()) < 0 is guaranteed to
	be false, so check for (u_int)-1, which represents failure,
	explicitly.

	print-isakmp.c: complete initialization of attrmap objects.

	print-lwres.c: "if(x); print foo;" seemed much more likely to be
	intended to be "if(x) { print foo; }".

	print-smb.c: complete initialization of some structures.

In addition, add some fixes for the signed vs. unsigned comparison
warnings:

	extract.h: cast the result of the byte-extraction-and-combining,
	as, at least for the 16-bit version, C's integral promotions
	will turn "u_int16_t" into "int" if there are other "int"s
	nearby.

	print-*.c: make some more variables unsigned, or add casts to an
	unsigned type of signed values known not to be negative, or add
	casts to "int" of unsigned values known to fit in an "int", and
	make other changes needed to handle the aforementioned variables
	now being unsigned.

	print-isakmp.c: clean up the handling of error/status indicators
	in notify messages.

	print-ppp.c: get rid of a check that an unsigned quantity is >=
	0.

	print-radius.c: clean up some of the bounds checking.

	print-smb.c: extract the word count into a "u_int" to avoid the
	aforementioned problems with C's integral promotions.

	print-snmp.c: change a check that an unsigned variable is >= 0
	to a check that it's != 0.

Also, fix some formats to use "%u" rather than "%d" for unsigned
quantities.
41 files changed
tree: faf57bac69529b8d0e0700df10e30844cf553779
  1. lbl/
  2. missing/
  3. win32/
  4. .cvsignore
  5. acconfig.h
  6. aclocal.m4
  7. addrtoname.c
  8. addrtoname.h
  9. ah.h
  10. appletalk.h
  11. arcnet.h
  12. atime.awk
  13. atm.h
  14. atmuni31.h
  15. bootp.h
  16. bpf_dump.c
  17. CHANGES
  18. chdlc.h
  19. config.guess
  20. config.h.in
  21. config.sub
  22. configure
  23. configure.in
  24. CREDITS
  25. decnet.h
  26. esp.h
  27. ether.h
  28. ethertype.h
  29. extract.h
  30. fddi.h
  31. FILES
  32. gmt2local.c
  33. gmt2local.h
  34. icmp6.h
  35. ieee802_11.h
  36. igrp.h
  37. INSTALL
  38. install-sh
  39. interface.h
  40. ip.h
  41. ip6.h
  42. ipsec_doi.h
  43. ipx.h
  44. isakmp.h
  45. l2tp.h
  46. lane.h
  47. LICENSE
  48. llc.h
  49. machdep.c
  50. machdep.h
  51. Makefile-devel-adds
  52. Makefile.in
  53. makemib
  54. mib.h
  55. mkdep
  56. nameser.h
  57. netbios.h
  58. nfs.h
  59. nfsfh.h
  60. ntp.h
  61. oakley.h
  62. ospf.h
  63. ospf6.h
  64. packetdat.awk
  65. parsenfsfh.c
  66. PLATFORMS
  67. ppp.h
  68. print-802_11.c
  69. print-ah.c
  70. print-arcnet.c
  71. print-arp.c
  72. print-ascii.c
  73. print-atalk.c
  74. print-atm.c
  75. print-beep.c
  76. print-bgp.c
  77. print-bootp.c
  78. print-cdp.c
  79. print-chdlc.c
  80. print-cip.c
  81. print-cnfp.c
  82. print-decnet.c
  83. print-dhcp6.c
  84. print-domain.c
  85. print-dvmrp.c
  86. print-egp.c
  87. print-esp.c
  88. print-ether.c
  89. print-fddi.c
  90. print-fr.c
  91. print-frag6.c
  92. print-gre.c
  93. print-hsrp.c
  94. print-icmp.c
  95. print-icmp6.c
  96. print-igmp.c
  97. print-igrp.c
  98. print-ip.c
  99. print-ip6.c
  100. print-ip6opts.c
  101. print-ipcomp.c
  102. print-ipx.c
  103. print-isakmp.c
  104. print-isoclns.c
  105. print-krb.c
  106. print-l2tp.c
  107. print-lane.c
  108. print-lcp.c
  109. print-llc.c
  110. print-lwres.c
  111. print-mobile.c
  112. print-mobility.c
  113. print-mpls.c
  114. print-msdp.c
  115. print-netbios.c
  116. print-nfs.c
  117. print-ntp.c
  118. print-null.c
  119. print-ospf.c
  120. print-ospf6.c
  121. print-pflog.c
  122. print-pim.c
  123. print-ppp.c
  124. print-pppoe.c
  125. print-pptp.c
  126. print-radius.c
  127. print-raw.c
  128. print-rip.c
  129. print-ripng.c
  130. print-rt6.c
  131. print-rx.c
  132. print-sctp.c
  133. print-sl.c
  134. print-sll.c
  135. print-smb.c
  136. print-snmp.c
  137. print-stp.c
  138. print-sunatm.c
  139. print-sunrpc.c
  140. print-tcp.c
  141. print-telnet.c
  142. print-tftp.c
  143. print-timed.c
  144. print-token.c
  145. print-udp.c
  146. print-vjc.c
  147. print-vrrp.c
  148. print-wb.c
  149. print-zephyr.c
  150. README
  151. Readme.Win32
  152. route6d.h
  153. rx.h
  154. sctpConstants.h
  155. sctpHeader.h
  156. send-ack.awk
  157. setsignal.c
  158. setsignal.h
  159. slcompress.h
  160. slip.h
  161. sll.h
  162. smb.h
  163. smbutil.c
  164. stime.awk
  165. strcasecmp.c
  166. tcp.h
  167. tcpdump-stdinc.h
  168. tcpdump.1
  169. tcpdump.c
  170. telnet.h
  171. timed.h
  172. TODO
  173. token.h
  174. udp.h
  175. util.c
  176. VERSION
  177. vfprintf.c