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.
diff --git a/tests/aspath_test.c b/tests/aspath_test.c
index 4a2ce9a..83eb9d8 100644
--- a/tests/aspath_test.c
+++ b/tests/aspath_test.c
@@ -983,8 +983,8 @@
       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 @@
   printf ("\n");
   
   if (asp)
-    aspath_unintern (asp);
+    aspath_unintern (&asp);
 }
 
 /* prepend testing */
@@ -1046,7 +1046,7 @@
   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 @@
     printf ("%s!\n", FAILED);
   
   printf ("\n");
-  aspath_unintern (asp1);
+  aspath_unintern (&asp1);
   aspath_free (asp2);
 }
 
@@ -1074,7 +1074,7 @@
   asp2 = aspath_empty ();
   
   ascratch = aspath_dup (asp2);
-  aspath_unintern (asp2);
+  aspath_unintern (&asp2);
   
   asp2 = aspath_prepend (asp1, ascratch);
   
@@ -1087,7 +1087,7 @@
   
   printf ("\n");
   if (asp1)
-    aspath_unintern (asp1);
+    aspath_unintern (&asp1);
   aspath_free (asp2);
 }
 
@@ -1111,8 +1111,8 @@
     printf (FAILED "!\n");
   
   printf ("\n");
-  aspath_unintern (asp1);
-  aspath_unintern (asp2);
+  aspath_unintern (&asp1);
+  aspath_unintern (&asp2);
   aspath_free (ascratch);
 }
 
@@ -1137,8 +1137,8 @@
     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 @@
         printf (OK "\n");
       
       printf ("\n");
-      aspath_unintern (asp1);
-      aspath_unintern (asp2);
+      aspath_unintern (&asp1);
+      aspath_unintern (&asp2);
     }
 }
 
@@ -1218,7 +1218,7 @@
   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 @@
 
 out:
   if (attr.aspath)
-    aspath_unintern (attr.aspath);
+    aspath_unintern (&attr.aspath);
   if (asp)
-    aspath_unintern (asp);
+    aspath_unintern (&asp);
   return failed - initfail;
 }