Revert "lib: address -Wunused-but-set-variable"

Stephen Hemminger's commits contain all the changes and
several other warning fixes.

This reverts commit 6947dbebdc91b6272f8107a6e0dd211457438606.
diff --git a/lib/if.c b/lib/if.c
index 41115b0..d14cfb9 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -426,6 +426,9 @@
 static void
 if_dump (const struct interface *ifp)
 {
+  struct listnode *node;
+  struct connected *c;
+
   zlog_info ("Interface %s index %d metric %d mtu %d "
 #ifdef HAVE_IPV6
              "mtu6 %d "
@@ -436,6 +439,9 @@
 	     ifp->mtu6,
 #endif /* HAVE_IPV6 */
 	     if_flag_dump (ifp->flags));
+  
+  for (ALL_LIST_ELEMENTS_RO (ifp->connected, node, c))
+    ;
 }
 
 /* Interface printing for all interface. */