]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Revert "lib: address -Wunused-but-set-variable"
authorDenis Ovsienko <infrastation@yandex.ru>
Tue, 6 Dec 2011 21:35:11 +0000 (01:35 +0400)
committerDenis Ovsienko <infrastation@yandex.ru>
Mon, 2 Jan 2012 13:27:05 +0000 (17:27 +0400)
Stephen Hemminger's commits contain all the changes and
several other warning fixes.

This reverts commit 6947dbebdc91b6272f8107a6e0dd211457438606.

lib/distribute.c
lib/if.c
lib/if_rmap.c
lib/vty.c

index 056cd40131ca5700fc896e505f39f9174cbd270f..7f84b80ed86911c9ffef4800d06d8ab5750a2ac9 100644 (file)
@@ -304,6 +304,7 @@ DEFUN (distribute_list_all,
        "Filter outgoing routing updates\n")
 {
   enum distribute_type type;
+  struct distribute *dist;
 
   /* Check of distribute list type. */
   if (strncmp (argv[1], "i", 1) == 0)
@@ -318,7 +319,7 @@ DEFUN (distribute_list_all,
     }
 
   /* Get interface name corresponding distribute list. */
-  distribute_list_set (NULL, type, argv[0]);
+  dist = distribute_list_set (NULL, type, argv[0]);
 
   return CMD_SUCCESS;
 }
@@ -383,6 +384,7 @@ DEFUN (distribute_list,
        "Interface name\n")
 {
   enum distribute_type type;
+  struct distribute *dist;
 
   /* Check of distribute list type. */
   if (strncmp (argv[1], "i", 1) == 0)
@@ -396,7 +398,7 @@ DEFUN (distribute_list,
     }
 
   /* Get interface name corresponding distribute list. */
-  distribute_list_set (argv[2], type, argv[0]);
+  dist = distribute_list_set (argv[2], type, argv[0]);
 
   return CMD_SUCCESS;
 }       
@@ -461,6 +463,7 @@ DEFUN (distribute_list_prefix_all,
        "Filter outgoing routing updates\n")
 {
   enum distribute_type type;
+  struct distribute *dist;
 
   /* Check of distribute list type. */
   if (strncmp (argv[1], "i", 1) == 0)
@@ -475,7 +478,7 @@ DEFUN (distribute_list_prefix_all,
     }
 
   /* Get interface name corresponding distribute list. */
-  distribute_list_prefix_set (NULL, type, argv[0]);
+  dist = distribute_list_prefix_set (NULL, type, argv[0]);
 
   return CMD_SUCCESS;
 }       
@@ -543,6 +546,7 @@ DEFUN (distribute_list_prefix, distribute_list_prefix_cmd,
        "Interface name\n")
 {
   enum distribute_type type;
+  struct distribute *dist;
 
   /* Check of distribute list type. */
   if (strncmp (argv[1], "i", 1) == 0)
@@ -557,7 +561,7 @@ DEFUN (distribute_list_prefix, distribute_list_prefix_cmd,
     }
 
   /* Get interface name corresponding distribute list. */
-  distribute_list_prefix_set (argv[2], type, argv[0]);
+  dist = distribute_list_prefix_set (argv[2], type, argv[0]);
 
   return CMD_SUCCESS;
 }       
index 41115b0f09c897a5bf8fbeb47c3f4ea5fd9268b8..d14cfb939633eba67c7aeda9221a72f420d8728d 100644 (file)
--- a/lib/if.c
+++ b/lib/if.c
@@ -426,6 +426,9 @@ if_flag_dump (unsigned long flag)
 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 @@ if_dump (const struct interface *ifp)
             ifp->mtu6,
 #endif /* HAVE_IPV6 */
             if_flag_dump (ifp->flags));
+  
+  for (ALL_LIST_ELEMENTS_RO (ifp->connected, node, c))
+    ;
 }
 
 /* Interface printing for all interface. */
index b49d266952b1be418b97decf0a8ff56a5daad7d1..ddc62fd51b2ccc32d99fa7adfc7c3e98f3cface7 100644 (file)
@@ -212,6 +212,7 @@ DEFUN (if_rmap,
        "Route map interface name\n")
 {
   enum if_rmap_type type;
+  struct if_rmap *if_rmap;
 
   if (strncmp (argv[1], "i", 1) == 0)
     type = IF_RMAP_IN;
@@ -223,7 +224,7 @@ DEFUN (if_rmap,
       return CMD_WARNING;
     }
 
-  if_rmap_set (argv[2], type, argv[0]);
+  if_rmap = if_rmap_set (argv[2], type, argv[0]);
 
   return CMD_SUCCESS;
 }      
index 83bd6785fc51bb7b5bcbdade4c809897bb603fc4..d9eb921e26a80fd94774702d68ecbbdb02e07732 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -1685,6 +1685,7 @@ static int
 vty_accept (struct thread *thread)
 {
   int vty_sock;
+  struct vty *vty;
   union sockunion su;
   int ret;
   unsigned int on;
@@ -1769,7 +1770,7 @@ vty_accept (struct thread *thread)
   if (bufp)
     XFREE (MTYPE_TMP, bufp);
 
-  vty_create (vty_sock, &su);
+  vty = vty_create (vty_sock, &su);
 
   return 0;
 }