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-dvmrp.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-dvmrp.c')
-rw-r--r-- | print-dvmrp.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/print-dvmrp.c b/print-dvmrp.c index fcd1a31a..0c72264a 100644 --- a/print-dvmrp.c +++ b/print-dvmrp.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-dvmrp.c,v 1.23 2002-09-05 00:00:11 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-dvmrp.c,v 1.24 2002-09-05 21:25:40 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -66,9 +66,9 @@ static void print_probe(const u_char *, const u_char *, u_int); static void print_report(const u_char *, const u_char *, u_int); static void print_neighbors(const u_char *, const u_char *, u_int); static void print_neighbors2(const u_char *, const u_char *, u_int); -static void print_prune(const u_char *, const u_char *, u_int); -static void print_graft(const u_char *, const u_char *, u_int); -static void print_graft_ack(const u_char *, const u_char *, u_int); +static void print_prune(const u_char *); +static void print_graft(const u_char *); +static void print_graft_ack(const u_char *); static u_int32_t target_level; @@ -130,17 +130,17 @@ dvmrp_print(register const u_char *bp, register u_int len) case DVMRP_PRUNE: printf(" Prune"); - print_prune(bp, ep, len); + print_prune(bp); break; case DVMRP_GRAFT: printf(" Graft"); - print_graft(bp, ep, len); + print_graft(bp); break; case DVMRP_GRAFT_ACK: printf(" Graft-ACK"); - print_graft_ack(bp, ep, len); + print_graft_ack(bp); break; default: @@ -313,8 +313,7 @@ trunc: } static void -print_prune(register const u_char *bp, register const u_char *ep, - register u_int len) +print_prune(register const u_char *bp) { TCHECK2(bp[0], 12); printf(" src %s grp %s", ipaddr_string(bp), ipaddr_string(bp + 4)); @@ -327,8 +326,7 @@ trunc: } static void -print_graft(register const u_char *bp, register const u_char *ep, - register u_int len) +print_graft(register const u_char *bp) { TCHECK2(bp[0], 8); printf(" src %s grp %s", ipaddr_string(bp), ipaddr_string(bp + 4)); @@ -338,8 +336,7 @@ trunc: } static void -print_graft_ack(register const u_char *bp, register const u_char *ep, - register u_int len) +print_graft_ack(register const u_char *bp) { TCHECK2(bp[0], 8); printf(" src %s grp %s", ipaddr_string(bp), ipaddr_string(bp + 4)); |