Fix clang warnings in api code

Change-Id: I7a4bc4678fea723c35bbeac1b893c5c52235aa67
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/vpp-api-test/vat/api_format.c b/vpp-api-test/vat/api_format.c
index 29629c9..ed96af7 100644
--- a/vpp-api-test/vat/api_format.c
+++ b/vpp-api-test/vat/api_format.c
@@ -2481,7 +2481,7 @@
              "%-12s\n",
              "sw_if_index");
 
-    if (0 == vam->ip_details_by_sw_if_index) {
+    if (0 == vam) {
         return 0;
     }
 
@@ -2879,31 +2879,31 @@
     /* Get list of ethernets */
     M(SW_INTERFACE_DUMP, sw_interface_dump);
     mp->name_filter_valid = 1;
-    strncpy ((char *) mp->name_filter, "Ether", sizeof(mp->name_filter-1)); 
+    strncpy ((char *) mp->name_filter, "Ether", sizeof(mp->name_filter)-1);
     S;
 
     /* and local / loopback interfaces */
     M(SW_INTERFACE_DUMP, sw_interface_dump);
     mp->name_filter_valid = 1;
-    strncpy ((char *) mp->name_filter, "lo", sizeof(mp->name_filter-1)); 
+    strncpy ((char *) mp->name_filter, "lo", sizeof(mp->name_filter)-1);
     S;
 
     /* and vxlan tunnel interfaces */
     M(SW_INTERFACE_DUMP, sw_interface_dump);
     mp->name_filter_valid = 1;
-    strncpy ((char *) mp->name_filter, "vxlan", sizeof(mp->name_filter-1)); 
+    strncpy ((char *) mp->name_filter, "vxlan", sizeof(mp->name_filter)-1);
     S;
 
     /* and host (af_packet) interfaces */
     M(SW_INTERFACE_DUMP, sw_interface_dump);
     mp->name_filter_valid = 1;
-    strncpy ((char *) mp->name_filter, "host", sizeof(mp->name_filter-1));
+    strncpy ((char *) mp->name_filter, "host", sizeof(mp->name_filter)-1);
     S;
 
     /* and l2tpv3 tunnel interfaces */
     M(SW_INTERFACE_DUMP, sw_interface_dump);
     mp->name_filter_valid = 1;
-    strncpy ((char *) mp->name_filter, "l2tpv3_tunnel", sizeof(mp->name_filter-1));
+    strncpy ((char *) mp->name_filter, "l2tpv3_tunnel", sizeof(mp->name_filter)-1);
     S;
 
     /* Use a control ping for synchronization */
@@ -6906,7 +6906,7 @@
             break;
     }
 
-    if (key == ~0) {
+    if (key == (u8) ~0) {
         errmsg ("l2tp session lookup key unset\n");
         return -99;
     }