diff options
author | guy <guy> | 2002-09-05 21:25:34 +0000 |
---|---|---|
committer | guy <guy> | 2002-09-05 21:25:34 +0000 |
commit | c422d3ab0f6de2d38512a4566637bc47df291e74 (patch) | |
tree | 2d4881bf0fd7ad4e433201643b5b6a66f17e997c /print-cip.c | |
parent | c2bfaa85753ea1cad8c3729692a6bdbb80780f91 (diff) | |
download | tcpdump-c422d3ab0f6de2d38512a4566637bc47df291e74.tar.gz |
Get rid of the "-Wno-unused" flag, and fix up most of the
unused-parameter problems reported by GCC. Add an _U_ tag to label
parameters as unused if the function is called through a pointer (so
that you can't change its signature by removing parameters) or if there
are unused parameters only because the function isn't complete.
Add some additional bounds checks the necessity for which was revealed
while cleaning up unused-parameter problems.
Make some routines static.
"lcp_print()", defined in "print-lcp.c", isn't called anywhere -
"print-ppp.c" has the code to dissect LCP. Get rid of "print-lcp.c".
Diffstat (limited to 'print-cip.c')
-rw-r--r-- | print-cip.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/print-cip.c b/print-cip.c index ff391808..e986e52c 100644 --- a/print-cip.c +++ b/print-cip.c @@ -22,7 +22,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.18 2002-08-01 08:53:03 risso Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.19 2002-09-05 21:25:38 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -52,7 +52,7 @@ static unsigned char rfcllc[] = { 0x00 }; static inline void -cip_print(register const u_char *bp, int length) +cip_print(int length) { /* * There is no MAC-layer header, so just print the length. @@ -61,13 +61,13 @@ cip_print(register const u_char *bp, int length) } /* - * This is the top level routine of the printer. 'p' is the points - * to the raw header of the packet, 'tvp' is the timestamp, - * 'length' is the length of the packet off the wire, and 'caplen' + * This is the top level routine of the printer. 'p' points + * to the LLC/SNAP or raw header of the packet, 'h->ts' is the timestamp, + * 'h->length' is the length of the packet off the wire, and 'h->caplen' * is the number of bytes actually captured. */ void -cip_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) +cip_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p) { u_int caplen = h->caplen; u_int length = h->len; @@ -82,7 +82,7 @@ cip_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) } if (eflag) - cip_print(p, length); + cip_print(length); /* * Some printers want to get back at the ethernet addresses, @@ -100,7 +100,7 @@ cip_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) &extracted_ethertype) == 0) { /* ether_type not known, print raw packet */ if (!eflag) - cip_print(p, length); + cip_print(length); if (extracted_ethertype) { printf("(LLC %s) ", etherproto_string(htons(extracted_ethertype))); |