summaryrefslogtreecommitdiff
path: root/tests/test-checksum.c
diff options
context:
space:
mode:
authorPaul Jakma <paul@quagga.net>2012-05-01 16:20:33 +0100
committerPaul Jakma <paul@quagga.net>2012-05-02 11:02:10 +0100
commit1dba254e107dd0c4254d58e9304fc6293b46fd4d (patch)
tree963153a04b71da32dd5906b80aaf24a1bb6c93e9 /tests/test-checksum.c
parent6ebeebb50610cc86d16e56bc1a33d63340094215 (diff)
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.
Diffstat (limited to 'tests/test-checksum.c')
-rw-r--r--tests/test-checksum.c9
1 files changed, 3 insertions, 6 deletions
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 */
{