mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-02-01 15:35:00 +00:00
[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.
This commit is contained in:
parent
779adb0147
commit
e8e1946edf
@ -1,3 +1,12 @@
|
||||
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.
|
||||
|
||||
2006-01-17 Paul Jakma <paul.jakma@sun.com>
|
||||
|
||||
* bgp_nexthop.c: (zlookup_read*) convert to new Zserv format.
|
||||
|
||||
@ -1309,37 +1309,30 @@ aspath_gettoken (const char *buf, enum as_token *token, u_short *asno)
|
||||
{
|
||||
case '\0':
|
||||
return NULL;
|
||||
break;
|
||||
case '{':
|
||||
*token = as_token_set_start;
|
||||
p++;
|
||||
return p;
|
||||
break;
|
||||
case '}':
|
||||
*token = as_token_set_end;
|
||||
p++;
|
||||
return p;
|
||||
break;
|
||||
case '(':
|
||||
*token = as_token_confed_seq_start;
|
||||
p++;
|
||||
return p;
|
||||
break;
|
||||
case ')':
|
||||
*token = as_token_confed_seq_end;
|
||||
p++;
|
||||
return p;
|
||||
break;
|
||||
case '[':
|
||||
*token = as_token_confed_set_start;
|
||||
p++;
|
||||
return p;
|
||||
break;
|
||||
case ']':
|
||||
*token = as_token_confed_set_end;
|
||||
p++;
|
||||
return p;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check actual AS value. */
|
||||
@ -1423,7 +1416,6 @@ aspath_str2aspath (const char *str)
|
||||
default:
|
||||
aspath_free (aspath);
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -983,7 +983,6 @@ bgp_mp_reach_parse (struct peer *peer, bgp_size_t length, struct attr *attr,
|
||||
zlog_info ("Wrong multiprotocol next hop length: %d",
|
||||
attr->mp_nexthop_len);
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
|
||||
snpa_num = stream_getc (s);
|
||||
|
||||
@ -41,7 +41,6 @@ community_list_master_lookup (struct community_list_handler *ch, int master)
|
||||
{
|
||||
case COMMUNITY_LIST_MASTER:
|
||||
return &ch->community_list;
|
||||
break;
|
||||
case EXTCOMMUNITY_LIST_MASTER:
|
||||
return &ch->extcommunity_list;
|
||||
}
|
||||
|
||||
@ -594,7 +594,6 @@ community_str2com (const char *str)
|
||||
default:
|
||||
if (com)
|
||||
community_free (com);
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -500,7 +500,6 @@ ecommunity_str2com (const char *str, int type, int keyword_included)
|
||||
if (ecom)
|
||||
ecommunity_free (ecom);
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ecom;
|
||||
|
||||
@ -303,13 +303,10 @@ filter_type_str (enum as_filter_type type)
|
||||
{
|
||||
case AS_FILTER_PERMIT:
|
||||
return "permit";
|
||||
break;
|
||||
case AS_FILTER_DENY:
|
||||
return "deny";
|
||||
break;
|
||||
default:
|
||||
return "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -313,5 +313,5 @@ main (int argc, char **argv)
|
||||
thread_call (&thread);
|
||||
|
||||
/* Not reached. */
|
||||
exit (0);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -678,7 +678,6 @@ bgp_write (struct thread *thread)
|
||||
peer->status = Idle;
|
||||
bgp_timer_set (peer);
|
||||
return 0;
|
||||
break;
|
||||
case BGP_MSG_KEEPALIVE:
|
||||
peer->keepalive_out++;
|
||||
break;
|
||||
|
||||
@ -8100,7 +8100,7 @@ ALIAS (show_bgp_community_list,
|
||||
"Address family\n"
|
||||
"Display routes matching the community-list\n"
|
||||
"community-list number\n"
|
||||
"community-list name\n");
|
||||
"community-list name\n")
|
||||
|
||||
/* old command */
|
||||
DEFUN (show_ipv6_bgp_community_list,
|
||||
|
||||
@ -2046,11 +2046,9 @@ bgp_route_match_add (struct vty *vty, struct route_map_index *index,
|
||||
case RMAP_RULE_MISSING:
|
||||
vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
case RMAP_COMPILE_ERROR:
|
||||
vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return CMD_SUCCESS;
|
||||
@ -2071,11 +2069,9 @@ bgp_route_match_delete (struct vty *vty, struct route_map_index *index,
|
||||
case RMAP_RULE_MISSING:
|
||||
vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
case RMAP_COMPILE_ERROR:
|
||||
vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return CMD_SUCCESS;
|
||||
@ -2096,11 +2092,9 @@ bgp_route_set_add (struct vty *vty, struct route_map_index *index,
|
||||
case RMAP_RULE_MISSING:
|
||||
vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
case RMAP_COMPILE_ERROR:
|
||||
vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return CMD_SUCCESS;
|
||||
@ -2121,11 +2115,9 @@ bgp_route_set_delete (struct vty *vty, struct route_map_index *index,
|
||||
case RMAP_RULE_MISSING:
|
||||
vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
case RMAP_COMPILE_ERROR:
|
||||
vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return CMD_SUCCESS;
|
||||
|
||||
@ -324,17 +324,14 @@ DEFUN (router_bgp,
|
||||
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 @@ peer_remote_as_vty (struct vty *vty, const char *peer_str,
|
||||
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 @@ ALIAS (neighbor_disable_connected_check,
|
||||
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 @@ ALIAS (no_neighbor_disable_connected_check,
|
||||
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 @@ ALIAS (no_neighbor_maximum_prefix,
|
||||
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 @@ ALIAS (no_neighbor_maximum_prefix,
|
||||
"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 @@ community_direct_str (int direct)
|
||||
{
|
||||
case COMMUNITY_DENY:
|
||||
return "deny";
|
||||
break;
|
||||
case COMMUNITY_PERMIT:
|
||||
return "permit";
|
||||
break;
|
||||
default:
|
||||
return "unknown";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -85,7 +85,6 @@ bgp_option_set (int flag)
|
||||
break;
|
||||
default:
|
||||
return BGP_ERR_INVALID_FLAG;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -105,7 +104,6 @@ bgp_option_unset (int flag)
|
||||
break;
|
||||
default:
|
||||
return BGP_ERR_INVALID_FLAG;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
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.
|
||||
|
||||
2006-01-18 Juergen Kammer <j.kammer@eurodata.de>
|
||||
|
||||
* ospf_lsa.c: (ospf_router_lsa_new) dont take reference to the
|
||||
|
||||
@ -181,7 +181,6 @@ ospf_area_desc_string (struct ospf_area *area)
|
||||
break;
|
||||
default:
|
||||
return ospf_area_name_string (area);
|
||||
break;
|
||||
}
|
||||
|
||||
return buf;
|
||||
|
||||
@ -3219,13 +3219,11 @@ ospf_lsa_lookup (struct ospf_area *area, u_int32_t type,
|
||||
case OSPF_OPAQUE_AREA_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
return ospf_lsdb_lookup_by_id (area->lsdb, type, id, adv_router);
|
||||
break;
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
return ospf_lsdb_lookup_by_id (ospf->lsdb, type, id, adv_router);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -3244,7 +3242,6 @@ ospf_lsa_lookup_by_id (struct ospf_area *area, u_int32_t type,
|
||||
{
|
||||
case OSPF_ROUTER_LSA:
|
||||
return ospf_lsdb_lookup_by_id (area->lsdb, type, id, id);
|
||||
break;
|
||||
case OSPF_NETWORK_LSA:
|
||||
for (rn = route_top (NETWORK_LSDB (area)); rn; rn = route_next (rn))
|
||||
if ((lsa = rn->info))
|
||||
@ -3259,7 +3256,6 @@ ospf_lsa_lookup_by_id (struct ospf_area *area, u_int32_t type,
|
||||
/* Currently not used. */
|
||||
assert (1);
|
||||
return ospf_lsdb_lookup_by_id (area->lsdb, type, id, id);
|
||||
break;
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
case OSPF_AS_NSSA_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
|
||||
@ -321,6 +321,6 @@ main (int argc, char **argv)
|
||||
thread_call (&thread);
|
||||
|
||||
/* Not reached. */
|
||||
exit (0);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
@ -110,11 +110,9 @@ ospf_route_match_delete (struct vty *vty, struct route_map_index *index,
|
||||
case RMAP_RULE_MISSING:
|
||||
vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
case RMAP_COMPILE_ERROR:
|
||||
vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,11 +133,9 @@ ospf_route_match_add (struct vty *vty, struct route_map_index *index,
|
||||
case RMAP_RULE_MISSING:
|
||||
vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
case RMAP_COMPILE_ERROR:
|
||||
vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,11 +156,9 @@ ospf_route_set_add (struct vty *vty, struct route_map_index *index,
|
||||
case RMAP_RULE_MISSING:
|
||||
vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
case RMAP_COMPILE_ERROR:
|
||||
vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -186,11 +180,9 @@ ospf_route_set_delete (struct vty *vty, struct route_map_index *index,
|
||||
case RMAP_RULE_MISSING:
|
||||
vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
case RMAP_COMPILE_ERROR:
|
||||
vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3870,7 +3870,7 @@ show_ip_ospf_database_summary (struct vty *vty, struct ospf *ospf, int self)
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
break;;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
2006-01-19 Paul Jakma <paul.jakma@sun.com>
|
||||
|
||||
* ripd.c: (main) return from main, not exit, cause it annoys SOS.
|
||||
|
||||
2006-01-17 Paul Jakma <paul.jakma@sun.com>
|
||||
|
||||
* ripd.c: (rip_auth_md5) remove pdigest, not needed.
|
||||
|
||||
@ -298,5 +298,5 @@ main (int argc, char **argv)
|
||||
thread_call (&thread);
|
||||
|
||||
/* Not reached. */
|
||||
exit (0);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
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.
|
||||
|
||||
2005-10-01 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
||||
|
||||
* ripng_zebra.c: (ripng_redistribute_write) Remove local hard-coded
|
||||
|
||||
@ -299,5 +299,5 @@ main (int argc, char **argv)
|
||||
thread_call (&thread);
|
||||
|
||||
/* Not reached. */
|
||||
exit (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -57,11 +57,9 @@ ripng_route_match_add (struct vty *vty, struct route_map_index *index,
|
||||
case RMAP_RULE_MISSING:
|
||||
vty_out (vty, "Can't find rule.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
case RMAP_COMPILE_ERROR:
|
||||
vty_out (vty, "Argument is malformed.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return CMD_SUCCESS;
|
||||
@ -81,11 +79,9 @@ ripng_route_match_delete (struct vty *vty, struct route_map_index *index,
|
||||
case RMAP_RULE_MISSING:
|
||||
vty_out (vty, "Can't find rule.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
case RMAP_COMPILE_ERROR:
|
||||
vty_out (vty, "Argument is malformed.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return CMD_SUCCESS;
|
||||
@ -105,11 +101,9 @@ ripng_route_set_add (struct vty *vty, struct route_map_index *index,
|
||||
case RMAP_RULE_MISSING:
|
||||
vty_out (vty, "Can't find rule.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
case RMAP_COMPILE_ERROR:
|
||||
vty_out (vty, "Argument is malformed.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return CMD_SUCCESS;
|
||||
@ -129,11 +123,9 @@ ripng_route_set_delete (struct vty *vty, struct route_map_index *index,
|
||||
case RMAP_RULE_MISSING:
|
||||
vty_out (vty, "Can't find rule.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
case RMAP_COMPILE_ERROR:
|
||||
vty_out (vty, "Argument is malformed.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return CMD_SUCCESS;
|
||||
|
||||
@ -1,3 +1,14 @@
|
||||
2006-01-19 Paul Jakma <paul.jakma@sun.com>
|
||||
|
||||
* (general) various miscellaneous compiler warning fixes.
|
||||
Remove redundant break statements from switch clauses
|
||||
which return.
|
||||
Remove stray semi-colons which cause empty-statement
|
||||
warnings.
|
||||
* main.c: (sighup) remove private declaration of external
|
||||
function.
|
||||
(main) return from main, not exit, cause it annoys SOS.
|
||||
|
||||
2006-01-18 Gunnar Stigen <gunnar.stigen@axxessit.no>
|
||||
|
||||
* zebra_rib.c: Take interface metric into account.
|
||||
|
||||
@ -163,9 +163,6 @@ sighup (void)
|
||||
static void
|
||||
sigint (void)
|
||||
{
|
||||
/* Decrared in rib.c */
|
||||
void rib_close ();
|
||||
|
||||
zlog_notice ("Terminating on signal");
|
||||
|
||||
if (!retain_mode)
|
||||
@ -378,5 +375,5 @@ main (int argc, char **argv)
|
||||
thread_call (&thread);
|
||||
|
||||
/* Not reached... */
|
||||
exit (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1497,7 +1497,7 @@ static_ipv4_nexthop_same (struct nexthop *nexthop, struct static_ipv4 *si)
|
||||
if (nexthop->type == NEXTHOP_TYPE_BLACKHOLE
|
||||
&& si->type == STATIC_IPV4_BLACKHOLE)
|
||||
return 1;
|
||||
return 0;;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Uninstall static route from RIB. */
|
||||
@ -2045,7 +2045,7 @@ static_ipv6_nexthop_same (struct nexthop *nexthop, struct static_ipv6 *si)
|
||||
&& IPV6_ADDR_SAME (&nexthop->gate.ipv6, &si->ipv6)
|
||||
&& strcmp (nexthop->ifname, si->ifname) == 0)
|
||||
return 1;
|
||||
return 0;;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@ -138,7 +138,6 @@ zebra_server_send_message(struct zserv *client)
|
||||
client->t_suicide = thread_add_event(zebrad.master, zserv_delayed_close,
|
||||
client, 0);
|
||||
return -1;
|
||||
break;
|
||||
case BUFFER_EMPTY:
|
||||
THREAD_OFF(client->t_write);
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user