summaryrefslogtreecommitdiff
path: root/tests/aspath_test.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/aspath_test.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/aspath_test.c')
-rw-r--r--tests/aspath_test.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/aspath_test.c b/tests/aspath_test.c
index 4a2ce9aa..83eb9d80 100644
--- a/tests/aspath_test.c
+++ b/tests/aspath_test.c
@@ -983,8 +983,8 @@ validate (struct aspath *as, const struct test_spec *sp)
printf ("private check: %d %d\n", sp->private_as,
aspath_private_as_check (as));
}
- aspath_unintern (asinout);
- aspath_unintern (as4);
+ aspath_unintern (&asinout);
+ aspath_unintern (&as4);
aspath_free (asconfeddel);
aspath_free (asstr);
@@ -1030,7 +1030,7 @@ parse_test (struct test_segment *t)
printf ("\n");
if (asp)
- aspath_unintern (asp);
+ aspath_unintern (&asp);
}
/* prepend testing */
@@ -1046,7 +1046,7 @@ prepend_test (struct tests *t)
asp2 = make_aspath (t->test2->asdata, t->test2->len, 0);
ascratch = aspath_dup (asp2);
- aspath_unintern (asp2);
+ aspath_unintern (&asp2);
asp2 = aspath_prepend (asp1, ascratch);
@@ -1058,7 +1058,7 @@ prepend_test (struct tests *t)
printf ("%s!\n", FAILED);
printf ("\n");
- aspath_unintern (asp1);
+ aspath_unintern (&asp1);
aspath_free (asp2);
}
@@ -1074,7 +1074,7 @@ empty_prepend_test (struct test_segment *t)
asp2 = aspath_empty ();
ascratch = aspath_dup (asp2);
- aspath_unintern (asp2);
+ aspath_unintern (&asp2);
asp2 = aspath_prepend (asp1, ascratch);
@@ -1087,7 +1087,7 @@ empty_prepend_test (struct test_segment *t)
printf ("\n");
if (asp1)
- aspath_unintern (asp1);
+ aspath_unintern (&asp1);
aspath_free (asp2);
}
@@ -1111,8 +1111,8 @@ as4_reconcile_test (struct tests *t)
printf (FAILED "!\n");
printf ("\n");
- aspath_unintern (asp1);
- aspath_unintern (asp2);
+ aspath_unintern (&asp1);
+ aspath_unintern (&asp2);
aspath_free (ascratch);
}
@@ -1137,8 +1137,8 @@ aggregate_test (struct tests *t)
printf (FAILED "!\n");
printf ("\n");
- aspath_unintern (asp1);
- aspath_unintern (asp2);
+ aspath_unintern (&asp1);
+ aspath_unintern (&asp2);
aspath_free (ascratch);
/* aspath_unintern (ascratch);*/
}
@@ -1185,8 +1185,8 @@ cmp_test ()
printf (OK "\n");
printf ("\n");
- aspath_unintern (asp1);
- aspath_unintern (asp2);
+ aspath_unintern (&asp1);
+ aspath_unintern (&asp2);
}
}
@@ -1218,7 +1218,7 @@ handle_attr_test (struct aspath_tests *t)
if (ret != t->result)
{
printf ("bgp_attr_parse returned %d, expected %d\n", ret, t->result);
- printf ("datalen %d\n", datalen);
+ printf ("datalen %zd\n", datalen);
failed++;
}
if (ret != 0)
@@ -1240,9 +1240,9 @@ handle_attr_test (struct aspath_tests *t)
out:
if (attr.aspath)
- aspath_unintern (attr.aspath);
+ aspath_unintern (&attr.aspath);
if (asp)
- aspath_unintern (asp);
+ aspath_unintern (&asp);
return failed - initfail;
}