From 8fee927850e9011b3bf46f2a8a0d54521d00a807 Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Fri, 14 Oct 2011 20:59:43 +0400 Subject: lib: address -Wunused-but-set-variable * 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 | 12 ++++-------- lib/if.c | 6 ------ lib/if_rmap.c | 3 +-- lib/vty.c | 3 +-- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/lib/distribute.c b/lib/distribute.c index 7f84b80e..056cd401 100644 --- a/lib/distribute.c +++ b/lib/distribute.c @@ -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; } diff --git a/lib/if.c b/lib/if.c index d14cfb93..41115b0f 100644 --- 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. */ diff --git a/lib/if_rmap.c b/lib/if_rmap.c index ddc62fd5..b49d2669 100644 --- a/lib/if_rmap.c +++ b/lib/if_rmap.c @@ -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; } diff --git a/lib/vty.c b/lib/vty.c index e403159b..4fed2711 100644 --- 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; } -- cgit v1.2.1