[compiler] miscellaneous trivial compiler warning fixes
2006-01-19 Paul Jakma <paul.jakma@sun.com>
* (general) various miscellaneous compiler warning fixes.
Remove redundant break statements from switch clauses
which return.
return from main, not exit, cause it annoys SOS.
Remove stray semi-colons which cause empty-statement
warnings.
* zebra/main.c: (sighup) remove private declaration of external
function.
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index c8d5b2a..6ee4823 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -324,17 +324,14 @@
vty_out (vty, "Please specify 'bgp multiple-instance' first%s",
VTY_NEWLINE);
return CMD_WARNING;
- break;
case BGP_ERR_AS_MISMATCH:
vty_out (vty, "BGP is already running; AS is %d%s", as, VTY_NEWLINE);
return CMD_WARNING;
- break;
case BGP_ERR_INSTANCE_MISMATCH:
vty_out (vty, "BGP view name and AS number mismatch%s", VTY_NEWLINE);
vty_out (vty, "BGP instance is already running; AS is %d%s",
as, VTY_NEWLINE);
return CMD_WARNING;
- break;
}
vty->node = BGP_NODE;
@@ -1276,11 +1273,9 @@
case BGP_ERR_PEER_GROUP_MEMBER:
vty_out (vty, "%% Peer-group AS %d. Cannot configure remote-as for member%s", as, VTY_NEWLINE);
return CMD_WARNING;
- break;
case BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT:
vty_out (vty, "%% The AS# can not be changed from %d to %s, peer-group members must be all internal or all external%s", as, as_str, VTY_NEWLINE);
return CMD_WARNING;
- break;
}
return bgp_vty_return (vty, ret);
}
@@ -2671,7 +2666,7 @@
NEIGHBOR_CMD2 "enforce-multihop",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
- "Enforce EBGP neighbors perform multihop\n");
+ "Enforce EBGP neighbors perform multihop\n")
/* Enforce multihop. */
ALIAS (no_neighbor_disable_connected_check,
@@ -2680,7 +2675,7 @@
NO_STR
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
- "Enforce EBGP neighbors perform multihop\n");
+ "Enforce EBGP neighbors perform multihop\n")
DEFUN (neighbor_description,
neighbor_description_cmd,
@@ -3804,7 +3799,7 @@
NEIGHBOR_ADDR_STR2
"Maximum number of prefix accept from this peer\n"
"maximum no. of prefix limit\n"
- "Only give warning message when limit is exceeded\n");
+ "Only give warning message when limit is exceeded\n")
ALIAS (no_neighbor_maximum_prefix,
no_neighbor_maximum_prefix_threshold_warning_cmd,
@@ -3815,7 +3810,7 @@
"Maximum number of prefix accept from this peer\n"
"maximum no. of prefix limit\n"
"Threshold value (%) at which to generate a warning msg\n"
- "Only give warning message when limit is exceeded\n");
+ "Only give warning message when limit is exceeded\n")
ALIAS (no_neighbor_maximum_prefix,
no_neighbor_maximum_prefix_restart_cmd,
@@ -9646,13 +9641,10 @@
{
case COMMUNITY_DENY:
return "deny";
- break;
case COMMUNITY_PERMIT:
return "permit";
- break;
default:
return "unknown";
- break;
}
}