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/distribute.c b/lib/distribute.c
index 056cd40..7f84b80 100644
--- a/lib/distribute.c
+++ b/lib/distribute.c
@@ -304,6 +304,7 @@
"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 @@
}
/* 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 @@
"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 @@
}
/* 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 @@
"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 @@
}
/* 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 @@
"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 @@
}
/* 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;
}