]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: address -Wunused-but-set-variable
authorDenis Ovsienko <infrastation@yandex.ru>
Fri, 14 Oct 2011 16:59:43 +0000 (20:59 +0400)
committerDenis Ovsienko <infrastation@yandex.ru>
Mon, 21 Nov 2011 14:25:31 +0000 (18:25 +0400)
* if.c
  * if_dump(): 'node', 'c'
* distribute.c
  * distribute_list_all(): 'dist'
  * distribute_list(): 'dist'
  * districute_list_prefix_all(): 'dist'
* if_rmap.c
  * if_rmap(): 'if_rmap'
* vty.c
  * vty_accept(): 'vty'

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

index 7f84b80ed86911c9ffef4800d06d8ab5750a2ac9..056cd40131ca5700fc896e505f39f9174cbd270f 100644 (file)
@@ -304,7 +304,6 @@ 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)
@@ -319,7 +318,7 @@ DEFUN (distribute_list_all,
     }
 
   /* Get interface name corresponding distribute list. */
-  dist = distribute_list_set (NULL, type, argv[0]);
+  distribute_list_set (NULL, type, argv[0]);
 
   return CMD_SUCCESS;
 }
@@ -384,7 +383,6 @@ 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)
@@ -398,7 +396,7 @@ DEFUN (distribute_list,
     }
 
   /* Get interface name corresponding distribute list. */
-  dist = distribute_list_set (argv[2], type, argv[0]);
+  distribute_list_set (argv[2], type, argv[0]);
 
   return CMD_SUCCESS;
 }       
@@ -463,7 +461,6 @@ 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)
@@ -478,7 +475,7 @@ DEFUN (distribute_list_prefix_all,
     }
 
   /* Get interface name corresponding distribute list. */
-  dist = distribute_list_prefix_set (NULL, type, argv[0]);
+  distribute_list_prefix_set (NULL, type, argv[0]);
 
   return CMD_SUCCESS;
 }       
@@ -546,7 +543,6 @@ 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)
@@ -561,7 +557,7 @@ DEFUN (distribute_list_prefix, distribute_list_prefix_cmd,
     }
 
   /* Get interface name corresponding distribute list. */
-  dist = distribute_list_prefix_set (argv[2], type, argv[0]);
+  distribute_list_prefix_set (argv[2], type, argv[0]);
 
   return CMD_SUCCESS;
 }       
index d14cfb939633eba67c7aeda9221a72f420d8728d..41115b0f09c897a5bf8fbeb47c3f4ea5fd9268b8 100644 (file)
--- a/lib/if.c
+++ b/lib/if.c
@@ -426,9 +426,6 @@ 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 "
@@ -439,9 +436,6 @@ 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 ddc62fd51b2ccc32d99fa7adfc7c3e98f3cface7..b49d266952b1be418b97decf0a8ff56a5daad7d1 100644 (file)
@@ -212,7 +212,6 @@ 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;
@@ -224,7 +223,7 @@ DEFUN (if_rmap,
       return CMD_WARNING;
     }
 
-  if_rmap = if_rmap_set (argv[2], type, argv[0]);
+  if_rmap_set (argv[2], type, argv[0]);
 
   return CMD_SUCCESS;
 }      
index e403159bee38f3a475f1521ee6cc53c66226ee5b..4fed2711566e126731802486bc628a4774520660 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -1685,7 +1685,6 @@ static int
 vty_accept (struct thread *thread)
 {
   int vty_sock;
-  struct vty *vty;
   union sockunion su;
   int ret;
   unsigned int on;
@@ -1770,7 +1769,7 @@ vty_accept (struct thread *thread)
   if (bufp)
     XFREE (MTYPE_TMP, bufp);
 
-  vty = vty_create (vty_sock, &su);
+  vty_create (vty_sock, &su);
 
   return 0;
 }