From 1dba254e107dd0c4254d58e9304fc6293b46fd4d Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Tue, 1 May 2012 16:20:33 +0100 Subject: tests: Fix some compile errors and warnings * aspath_test.c: match changes in aspath_unintern. Fix printf size_t warning. * bgp_capability_test.c: compile warnings. * bgp_mp_attr_test.c: update for attr parser context struct * ecommunity_test.c: ecommunity_free/ecommunity * test-checksum.c: some unused vars and funcs without need of prototypes. --- tests/test-checksum.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests/test-checksum.c') diff --git a/tests/test-checksum.c b/tests/test-checksum.c index bd156baa..fc4eb02d 100644 --- a/tests/test-checksum.c +++ b/tests/test-checksum.c @@ -32,7 +32,7 @@ accumulate (u_char *buffer, testsz_t len, testoff_t off) { u_int8_t *p; u_int16_t *csum; - int i, init_len, partial_len; + int i, partial_len; struct acc_vals ret; csum = (u_int16_t *) (buffer + off); @@ -41,7 +41,6 @@ accumulate (u_char *buffer, testsz_t len, testoff_t off) p = buffer; ret.c0 = 0; ret.c1 = 0; - init_len = len; while (len != 0) { @@ -397,11 +396,9 @@ verify (u_char * buffer, testsz_t len) u_int8_t *p; u_int32_t c0; u_int32_t c1; - u_int16_t checksum; int i, partial_len; p = buffer; - checksum = 0; c0 = 0; c1 = 0; @@ -427,7 +424,7 @@ verify (u_char * buffer, testsz_t len) return 1; } -int /* return checksum in low-order 16 bits */ +static int /* return checksum in low-order 16 bits */ in_cksum_optimized(void *parg, int nbytes) { u_short *ptr = parg; @@ -459,7 +456,7 @@ in_cksum_optimized(void *parg, int nbytes) } -int /* return checksum in low-order 16 bits */ +static int /* return checksum in low-order 16 bits */ in_cksum_rfc(void *parg, int count) /* from RFC 1071 */ { -- cgit v1.2.1