misc: fix static analysis warnings

One actual bugfix.

Type: fix
Ticket: VPP-1837

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Icef25167f97a70cc795c0a481174de319ed79ad5
diff --git a/src/svm/svm.c b/src/svm/svm.c
index c702625..6249a34 100644
--- a/src/svm/svm.c
+++ b/src/svm/svm.c
@@ -107,7 +107,7 @@
   rp->mutex_owner_pid = getpid ();
   rp->mutex_owner_tag = tag;
 #endif
-  ASSERT (nheld < MAXLOCK);
+  ASSERT (nheld < MAXLOCK);	//NOSONAR
   /*
    * Keep score of held mutexes so we can try to exit
    * cleanly if the world comes to an end at the worst possible
@@ -746,7 +746,7 @@
       return ((void *) rp);
 
     }
-  return 0;			/* NOTREACHED */
+  return 0;			/* NOTREACHED *///NOSONAR
 }
 
 static void
@@ -755,7 +755,7 @@
   int i;
   for (i = 0; i < nheld; i++)
     {
-      pthread_mutex_unlock (mutexes_held[i]);
+      pthread_mutex_unlock (mutexes_held[i]);	//NOSONAR
     }
 }
 
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index 8ab47c9..803daaf 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -17636,7 +17636,7 @@
       clib_memcpy (&ip4, &fp->nh.address.ip4, sizeof (ip4));
       vat_json_object_add_ip4 (node, "next_hop", ip4);
     }
-  else if (fp->proto == FIB_API_PATH_NH_PROTO_IP4)
+  else if (fp->proto == FIB_API_PATH_NH_PROTO_IP6)
     {
       clib_memcpy (&ip6, &fp->nh.address.ip6, sizeof (ip6));
       vat_json_object_add_ip6 (node, "next_hop", ip6);