diff options
47 files changed, 284 insertions, 0 deletions
diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index 48c43b7f6..cb2dd931d 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -736,6 +736,7 @@ DEFUN (dump_bgp_all, "Output filename\n" "Interval of output\n") { + /* CHECK ME argc referenced below */ int idx_dump_routes = 2; int idx_path = 3; int idx_interval = 4; diff --git a/bgpd/bgp_filter.c b/bgpd/bgp_filter.c index 5af840810..255f6c2b6 100644 --- a/bgpd/bgp_filter.c +++ b/bgpd/bgp_filter.c @@ -437,6 +437,7 @@ DEFUN (ip_as_path, "Specify packets to forward\n" "A regular-expression to match the BGP AS paths\n") { + /* CHECK ME argc referenced below */ int idx_word = 3; int idx_permit_deny = 4; enum as_filter_type type; @@ -496,6 +497,7 @@ DEFUN (no_ip_as_path, "Specify packets to forward\n" "A regular-expression to match the BGP AS paths\n") { + /* CHECK ME argc referenced below */ int idx_word = 4; int idx_permit_deny = 5; enum as_filter_type type; diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 48baedcea..03d712e71 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -924,6 +924,7 @@ DEFUN (show_ip_bgp_vpnv4_all_neighbor_routes, "Display routes learned from neighbor\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 6; union sockunion su; struct peer *peer; @@ -979,6 +980,7 @@ DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes, "Display routes learned from neighbor\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_ext_community = 5; int idx_ipv4 = 7; int ret; @@ -1051,6 +1053,7 @@ DEFUN (show_ip_bgp_vpnv4_all_neighbor_advertised_routes, "Display the routes advertised to a BGP neighbor\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 6; int ret; struct peer *peer; @@ -1105,6 +1108,7 @@ DEFUN (show_ip_bgp_vpnv4_rd_neighbor_advertised_routes, "Display the routes advertised to a BGP neighbor\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_ext_community = 5; int idx_ipv4 = 7; int ret; diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 68a1ca7a3..ac2d0ffc7 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -7772,6 +7772,7 @@ DEFUN (show_ip_bgp_ipv4, "Display route and more specific routes\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -7879,6 +7880,7 @@ DEFUN (show_ip_bgp_route, "Display only multipaths\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -7930,6 +7932,7 @@ DEFUN (show_ip_bgp_instance_all, BGP_INSTANCE_ALL_HELP_STR "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ u_char uj = use_json(argc, argv); /* CHECK ME we need to revisit all of the bgp_show_all_ commands */ @@ -7945,6 +7948,7 @@ DEFUN (show_bgp_instance_all, BGP_INSTANCE_ALL_HELP_STR "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ u_char uj = use_json(argc, argv); bgp_show_all_instances_routes_vty (vty, AFI_IP6, SAFI_UNICAST, uj); @@ -8861,6 +8865,7 @@ DEFUN (show_ip_bgp_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_peer = 4; struct peer *peer; u_char uj = use_json(argc, argv); @@ -8886,6 +8891,7 @@ DEFUN (show_ip_bgp_instance_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_word = 4; int idx_peer = 6; struct peer *peer; @@ -8911,6 +8917,7 @@ DEFUN (show_bgp_ipv6_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_peer = 4; struct peer *peer; u_char uj = use_json(argc, argv); @@ -8936,6 +8943,7 @@ DEFUN (show_bgp_instance_ipv6_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_word = 3; int idx_peer = 6; struct peer *peer; @@ -8964,6 +8972,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_safi = 4; int idx_peer = 6; struct peer *peer; @@ -8995,6 +9004,7 @@ DEFUN (show_ip_bgp_vpnv4_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_peer = 6; struct peer *peer; u_char uj = use_json(argc, argv); @@ -9271,6 +9281,7 @@ DEFUN (show_ip_bgp_instance_neighbor_advertised_route, "Name of the route map\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi = 5; @@ -9333,6 +9344,7 @@ DEFUN (show_ip_bgp_neighbor_received_prefix_filter, "Display the prefixlist filter\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -9442,6 +9454,7 @@ DEFUN (show_ip_bgp_neighbor_routes, "Display flap statistics of the routes learned from neighbor\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -9779,6 +9792,7 @@ DEFUN (bgp_damp_set, "Value to start suppressing a route\n" "Maximum duration to suppress a stable route\n") { + /* CHECK ME argc referenced below */ int idx_half_life = 2; int idx_reuse = 3; int idx_suppress = 4; diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index dff42ec0d..7e1e20458 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3026,6 +3026,7 @@ DEFUN (no_match_peer, "IP address of peer\n" "IPv6 address of peer\n") { + /* CHECK ME argc referenced below */ int idx_peer = 3; if (argc <= idx_peer) @@ -3064,6 +3065,7 @@ DEFUN (no_match_ip_address, "IP access-list number (expanded range)\n" "IP Access-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 4; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip address", NULL, @@ -3100,6 +3102,7 @@ DEFUN (no_match_ip_next_hop, "IP access-list number (expanded range)\n" "IP Access-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 4; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip next-hop", NULL, @@ -3131,6 +3134,7 @@ DEFUN (no_match_probability, "Match portion of routes defined by percentage value\n" "Percentage of routes\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; if (argc <= idx_number) return bgp_route_match_delete (vty, vty->index, "probability", NULL, @@ -3167,6 +3171,7 @@ DEFUN (no_match_ip_route_source, "IP access-list number (expanded range)\n" "IP standard access-list name\n") { + /* CHECK ME argc referenced below */ int idx_number = 4; if (argc <= idx_number) return bgp_route_match_delete (vty, vty->index, "ip route-source", @@ -3201,6 +3206,7 @@ DEFUN (no_match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 5; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip address prefix-list", @@ -3234,6 +3240,7 @@ DEFUN (no_match_ip_next_hop_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 5; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip next-hop prefix-list", @@ -3268,6 +3275,7 @@ DEFUN (no_match_ip_route_source_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 5; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip route-source prefix-list", @@ -3298,6 +3306,7 @@ DEFUN (no_match_metric, "Match metric of route\n" "Metric value\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; if (argc <= idx_number) return bgp_route_match_delete (vty, vty->index, "metric", @@ -3329,6 +3338,7 @@ DEFUN (no_match_local_pref, "Match local preference of route\n" "Local preference value\n") { + /* CHECK ME argc referenced below */ int idx_localpref = 3; if (argc <= idx_localpref) return bgp_route_match_delete (vty, vty->index, "local-preference", @@ -3605,6 +3615,7 @@ DEFUN (no_set_ip_nexthop, "Use peer address (for BGP only)\n" "IP address of next hop\n") { + /* CHECK ME argc referenced below */ int idx_peer = 4; if (argc <= idx_peer) return bgp_route_set_delete (vty, vty->index, "ip next-hop", NULL); @@ -3648,6 +3659,7 @@ DEFUN (no_set_metric, "Metric value for destination routing protocol\n" "Metric value\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; if (argc <= idx_number) return bgp_route_set_delete (vty, vty->index, "metric", NULL); @@ -3675,6 +3687,7 @@ DEFUN (no_set_local_pref, "BGP local preference path attribute\n" "Preference value\n") { + /* CHECK ME argc referenced below */ int idx_localpref = 3; if (argc <= idx_localpref) return bgp_route_set_delete (vty, vty->index, "local-preference", NULL); @@ -3702,6 +3715,7 @@ DEFUN (no_set_weight, "BGP weight for routing table\n" "Weight value\n") { + /* CHECK ME argc referenced below */ int idx_weight = 3; if (argc <= idx_weight) return bgp_route_set_delete (vty, vty->index, "weight", NULL); @@ -3719,6 +3733,7 @@ DEFUN (set_aspath_prepend, "Use the peer's AS-number\n" "Number of times to insert") { + /* CHECK ME argc referenced below */ int ret; char *str; @@ -3739,6 +3754,7 @@ DEFUN (no_set_aspath_prepend, "Prepend to the as-path\n" "AS number\n") { + /* CHECK ME argc referenced below */ int ret; char *str; @@ -3757,6 +3773,7 @@ DEFUN (set_aspath_exclude, "Exclude from the as-path\n" "AS number\n") { + /* CHECK ME argc referenced below */ int ret; char *str; @@ -3775,6 +3792,7 @@ DEFUN (no_set_aspath_exclude, "Exclude from the as-path\n" "AS number\n") { + /* CHECK ME argc referenced below */ int ret; char *str; @@ -3792,6 +3810,7 @@ DEFUN (set_community, "BGP community attribute\n" COMMUNITY_VAL_STR) { + /* CHECK ME argc referenced below */ int i; int first = 0; int additive = 0; @@ -3942,6 +3961,7 @@ DEFUN (set_ecommunity_rt, "Route Target extended community\n" "VPN extended community\n") { + /* CHECK ME argc referenced below */ int ret; char *str; @@ -3972,6 +3992,7 @@ DEFUN (set_ecommunity_soo, "Site-of-Origin extended community\n" "VPN extended community\n") { + /* CHECK ME argc referenced below */ int ret; char *str; @@ -4090,6 +4111,7 @@ DEFUN (no_set_aggregator_as, "AS number\n" "IP address of aggregator\n") { + /* CHECK ME argc referenced below */ int idx_asn = 4; int idx_ip = 5; int ret; @@ -4139,6 +4161,7 @@ DEFUN (no_set_tag, "Tag value for routing protocol\n" "Tag value\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; if (argc <= idx_number) return bgp_route_set_delete (vty, vty->index, "tag", NULL); @@ -4319,6 +4342,7 @@ DEFUN (no_set_ipv6_nexthop_global, "IPv6 global address\n" "IPv6 address of next hop\n") { + /* CHECK ME argc referenced below */ int idx_ipv6 = 5; if (argc <= idx_ipv6) return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop global", NULL); @@ -4365,6 +4389,7 @@ DEFUN (no_set_ipv6_nexthop_local, "IPv6 local address\n" "IPv6 address of next hop\n") { + /* CHECK ME argc referenced below */ int idx_ipv6 = 5; if (argc <= idx_ipv6) return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop local", NULL); @@ -4395,6 +4420,7 @@ DEFUN (no_set_vpnv4_nexthop, "VPNv4 next-hop address\n" "IP address of next hop\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 4; if (argc <= idx_ipv4) return bgp_route_set_delete (vty, vty->index, "vpnv4 next-hop", NULL); @@ -4422,6 +4448,7 @@ DEFUN (no_set_originator_id, "BGP originator ID attribute\n" "IP address of originator\n") { + /* CHECK ME argc referenced below */ int idx_id = 3; if (argc < idx_id) return bgp_route_set_delete (vty, vty->index, "originator-id", NULL); diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index a7a3520da..362e7db0f 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -664,6 +664,7 @@ DEFUN (router_bgp, AS_STR BGP_INSTANCE_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_asn = 2; int idx_view_vrf = 3; int idx_vrf = 4; @@ -744,6 +745,7 @@ DEFUN (no_router_bgp, AS_STR BGP_INSTANCE_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_asn = 3; int idx_vrf = 5; as_t as; @@ -827,6 +829,7 @@ DEFUN (no_bgp_router_id, "Override configured router identifier\n" "Manually configured router identifier\n") { + /* CHECK ME argc referenced below */ int idx_router_id = 3; int ret; struct in_addr id; @@ -949,6 +952,7 @@ DEFUN (bgp_confederation_peers, "Peer ASs in BGP confederation\n" AS_STR) { + /* CHECK ME argc referenced below */ struct bgp *bgp; as_t as; int i; @@ -980,6 +984,7 @@ DEFUN (no_bgp_confederation_peers, "Peer ASs in BGP confederation\n" AS_STR) { + /* CHECK ME argc referenced below */ struct bgp *bgp; as_t as; int i; @@ -1106,6 +1111,7 @@ DEFUN (bgp_maxmed_onstartup, "Effective on a startup\n" "Time (seconds) period for max-med\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; struct bgp *bgp; @@ -1134,6 +1140,7 @@ DEFUN (bgp_maxmed_onstartup_medv, "Time (seconds) period for max-med\n" "Max MED value to be used\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; int idx_number_2 = 4; struct bgp *bgp; @@ -2778,6 +2785,7 @@ DEFUN (neighbor_interface_config, "Member of the peer-group\n" "peer-group name\n") { + /* CHECK ME argc referenced below */ int idx_word = 1; int idx_peer_group_word = 4; @@ -2799,6 +2807,7 @@ DEFUN (neighbor_interface_config_v6only, "Member of the peer-group\n" "peer-group name\n") { + /* CHECK ME argc referenced below */ int idx_word = 1; int idx_peer_group_word = 5; @@ -4343,6 +4352,7 @@ DEFUN (neighbor_description, "Neighbor specific description\n" "Up to 80 characters describing this neighbor\n") { + /* CHECK ME argc referenced below */ int idx_peer = 1; struct peer *peer; char *str; @@ -4924,6 +4934,7 @@ DEFUN (neighbor_interface, "Interface\n" "Interface name\n") { + /* CHECK ME argc referenced below */ int idx_ip = 1; int idx_word = 3; if (argc == 3) @@ -5519,6 +5530,7 @@ DEFUN (neighbor_allowas_in, "Accept as-path with my AS present in it\n" "Number of occurances of AS number\n") { + /* CHECK ME argc referenced below */ int idx_peer = 1; int idx_number = 3; int ret; @@ -6012,6 +6024,7 @@ DEFUN (clear_ip_bgp_all, BGP_SOFT_IN_STR BGP_SOFT_OUT_STR) { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_clr_sort = 5; @@ -6205,6 +6218,7 @@ DEFUN (show_bgp_vrfs, "Show BGP VRFs\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ struct list *inst = bm->bgp; struct listnode *node; struct bgp *bgp; @@ -6860,6 +6874,7 @@ DEFUN (show_ip_bgp_summary, "Summary of BGP neighbor status\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -6886,6 +6901,7 @@ DEFUN (show_ip_bgp_instance_all_summary, "Summary of BGP neighbor status\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ u_char uj = use_json(argc, argv); bgp_show_all_instances_summary_vty (vty, AFI_IP, SAFI_UNICAST, uj); @@ -8737,6 +8753,7 @@ DEFUN (show_ip_bgp_neighbors, "Neighbor on bgp configured interface\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_ip = 1; int idx_view_vrf = 3; int idx_vrf = 4; @@ -8784,6 +8801,7 @@ DEFUN (show_ip_bgp_instance_all_neighbors, "Detailed information on TCP and BGP neighbor connections\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ u_char uj = use_json(argc, argv); bgp_show_all_instances_neighbors_vty (vty, uj); @@ -8918,6 +8936,7 @@ DEFUN (show_ip_bgp_updgrps, "Detailed info about dynamic update groups\n" "Specific subgroup to display detailed info for\n") { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -11302,6 +11321,7 @@ DEFUN (ip_community_list_standard, "Specify community to accept\n" COMMUNITY_VAL_STR) { + /* CHECK ME argc referenced below */ return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD); } @@ -11318,6 +11338,7 @@ DEFUN (no_ip_community_list_standard_all, "Specify community to accept\n" COMMUNITY_VAL_STR) { + /* CHECK ME argc referenced below */ return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD); } @@ -11334,6 +11355,7 @@ DEFUN (ip_community_list_expanded_all, "Specify community to accept\n" COMMUNITY_VAL_STR) { + /* CHECK ME argc referenced below */ return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED); } @@ -11350,6 +11372,7 @@ DEFUN (no_ip_community_list_expanded_all, "Specify community to accept\n" COMMUNITY_VAL_STR) { + /* CHECK ME argc referenced below */ return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED); } @@ -11541,6 +11564,7 @@ DEFUN (ip_extcommunity_list_standard, "Specify community to accept\n" EXTCOMMUNITY_VAL_STR) { + /* CHECK ME argc referenced below */ return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_STANDARD); } @@ -11556,6 +11580,7 @@ DEFUN (ip_extcommunity_list_name_expanded, "Specify community to accept\n" "An ordered list as a regular-expression\n") { + /* CHECK ME argc referenced below */ return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED); } @@ -11572,6 +11597,7 @@ DEFUN (no_ip_extcommunity_list_standard_all, "Specify community to accept\n" EXTCOMMUNITY_VAL_STR) { + /* CHECK ME argc referenced below */ return extcommunity_list_unset_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED); } @@ -11588,6 +11614,7 @@ DEFUN (no_ip_extcommunity_list_expanded_all, "Specify community to accept\n" "An ordered list as a regular-expression\n") { + /* CHECK ME argc referenced below */ return extcommunity_list_unset_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED); } diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c index 66a2d9825..038fba77e 100644 --- a/isisd/isis_redist.c +++ b/isisd/isis_redist.c @@ -618,6 +618,7 @@ DEFUN (no_isis_redistribute, "Redistribute into level-1\n" "Redistribute into level-2\n") { + /* CHECK ME argc referenced below */ int idx_afi = 2; int idx_protocol = 3; int idx_level = 4; @@ -668,6 +669,7 @@ DEFUN (isis_default_originate, "Route map reference\n" "Pointer to route-map entries\n") { + /* CHECK ME argc referenced below */ int idx_afi = 2; int idx_level = 3; int idx_metric_rmap = 4; @@ -739,6 +741,7 @@ DEFUN (no_isis_default_originate, "Distribute default route into level-1\n" "Distribute default route into level-2\n") { + /* CHECK ME argc referenced below */ int idx_afi = 3; int idx_level = 4; struct isis_area *area = vty->index; diff --git a/isisd/isis_routemap.c b/isisd/isis_routemap.c index a1f087548..6d130d08d 100644 --- a/isisd/isis_routemap.c +++ b/isisd/isis_routemap.c @@ -370,6 +370,7 @@ DEFUN (no_match_ip_address, "IP access-list number (expanded range)\n" "IP Access-list name\n") { + /* CHECK ME argc referenced below */ int idx_acl = 4; if (argc <= idx_acl) return isis_route_match_delete(vty, vty->index, "ip address", NULL); @@ -403,6 +404,7 @@ DEFUN (no_match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 5; if (argc <= idx_word) return isis_route_match_delete (vty, vty->index, "ip address prefix-list", NULL); @@ -434,6 +436,7 @@ DEFUN (no_match_ipv6_address, "Match IPv6 address of route\n" "IPv6 access-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 4; if (argc <= idx_word) return isis_route_match_delete(vty, vty->index, "ipv6 address", NULL); @@ -466,6 +469,7 @@ DEFUN (no_match_ipv6_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 5; if (argc <= idx_word) return isis_route_match_delete (vty, vty->index, "ipv6 address prefix-list", NULL); @@ -497,6 +501,7 @@ DEFUN (no_set_metric, "Metric value for destination routing protocol\n" "Metric value\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; if (argc <= idx_number) return isis_route_set_delete(vty, vty->index, "metric", NULL); diff --git a/isisd/isis_te.c b/isisd/isis_te.c index b9e75bcf2..2a5122a9d 100644 --- a/isisd/isis_te.c +++ b/isisd/isis_te.c @@ -1318,6 +1318,7 @@ DEFUN (show_isis_mpls_te_interface, "Interface information\n" "Interface name\n") { + /* CHECK ME argc referenced below */ int idx_interface = 4; struct interface *ifp; struct listnode *node; diff --git a/isisd/isis_vty.c b/isisd/isis_vty.c index a1970a901..91a7e2bde 100644 --- a/isisd/isis_vty.c +++ b/isisd/isis_vty.c @@ -2067,6 +2067,7 @@ DEFUN (area_passwd_md5, "Send but do not check PDUs on receiving\n" "Send and check PDUs on receiving\n") { + /* CHECK ME argc referenced below */ int idx_password = 0; int idx_word = 2; int idx_type = 5; @@ -2097,6 +2098,7 @@ DEFUN (area_passwd_clear, "Send but do not check PDUs on receiving\n" "Send and check PDUs on receiving\n") { + /* CHECK ME argc referenced below */ int idx_password = 0; int idx_word = 2; int idx_type = 5; diff --git a/isisd/isisd.c b/isisd/isisd.c index ffe17b364..8ee3ad4da 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -1918,6 +1918,7 @@ DEFUN (topology_generate_grid, "Optional param 3\n" "Topology\n") { + /* CHECK ME argc referenced below */ struct isis_area *area; area = vty->index; diff --git a/lib/command.c b/lib/command.c index 22416ea73..4be178e12 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1016,6 +1016,7 @@ DEFUN (config_quit, "quit", "Exit current mode and down to previous mode\n") { + /* CHECK ME argc referenced below */ return config_exit (self, vty, argc, argv); } @@ -1137,6 +1138,7 @@ DEFUN (config_write, "Write configuration currently in memory\n" "Write configuration to terminal\n") { + /* CHECK ME argc referenced below */ int idx_type = 1; unsigned int i; int fd; @@ -1282,6 +1284,7 @@ DEFUN (show_running_config, SHOW_STR "running configuration (same as write terminal/memory)\n") { + /* CHECK ME argc referenced below */ return config_write (self, vty, argc, argv); } @@ -1293,6 +1296,7 @@ DEFUN (copy_runningconf_startupconf, "Copy running config to... \n" "Copy running config to startup config (same as write file)\n") { + /* CHECK ME argc referenced below */ return config_write (self, vty, argc, argv); } /** -- **/ @@ -1374,6 +1378,7 @@ DEFUN (config_password, "Specifies a HIDDEN password will follow\n" "The password string\n") { + /* CHECK ME argc referenced below */ int idx_8 = 1; int idx_word = 2; if (argc == 3) // '8' was specified @@ -1420,6 +1425,7 @@ DEFUN (config_enable_password, "dummy string \n" "The HIDDEN 'enable' password string\n") { + /* CHECK ME argc referenced below */ int idx_8 = 2; int idx_word = 3; /* Crypt type is specified. */ @@ -1626,6 +1632,7 @@ DEFUN (config_logmsg, LOG_LEVEL_DESC "The message to send\n") { + /* CHECK ME argc referenced below */ int idx_log_level = 1; int level; char *message; @@ -1699,6 +1706,7 @@ DEFUN (config_log_stdout, "Set stdout logging level\n" LOG_LEVEL_DESC) { + /* CHECK ME argc referenced below */ int idx_log_level = 2; if (argc == 2) { @@ -1732,6 +1740,7 @@ DEFUN (config_log_monitor, "Set terminal line (monitor) logging level\n" LOG_LEVEL_DESC) { + /* CHECK ME argc referenced below */ int idx_log_level = 2; if (argc == 2) { @@ -1820,6 +1829,7 @@ DEFUN (config_log_file, "Logging filename\n" LOG_LEVEL_DESC) { + /* CHECK ME argc referenced below */ int idx_filename = 2; int idx_log_levels = 3; if (argc == 4) @@ -1860,6 +1870,7 @@ DEFUN (config_log_syslog, "Set syslog logging level\n" LOG_LEVEL_DESC) { + /* CHECK ME argc referenced below */ int idx_log_levels = 2; if (argc == 3) { diff --git a/lib/distribute.c b/lib/distribute.c index 8a0083391..e0b4f0468 100644 --- a/lib/distribute.c +++ b/lib/distribute.c @@ -308,6 +308,7 @@ DEFUN (distribute_list, "Filter outgoing routing updates\n" "Interface name\n") { + /* CHECK ME argc referenced below */ int prefix = (argv[1]->type == WORD_TKN) ? 1 : 0; /* Check of distribute list type. */ @@ -339,6 +340,7 @@ DEFUN (no_distribute_list, "Filter outgoing routing updates\n" "Interface name\n") { + /* CHECK ME argc referenced below */ int prefix = (argv[2]->type == WORD_TKN) ? 1 : 0; /* Check of distribute list type. */ diff --git a/lib/filter.c b/lib/filter.c index 11dd7cd1c..fd80b2a63 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -1480,6 +1480,7 @@ DEFUN (access_list_remark, "Access list entry comment\n" "Comment up to 100 characters\n") { + /* CHECK ME argc referenced below */ int idx_acl = 1; struct access_list *access; @@ -1525,6 +1526,7 @@ DEFUN (no_access_list_remark_comment, "Access list entry comment\n" "Comment up to 100 characters\n") { + /* CHECK ME argc referenced below */ return no_access_list_remark (self, vty, argc, argv); } @@ -1673,6 +1675,7 @@ DEFUN (ipv6_access_list_remark, "Access list entry comment\n" "Comment up to 100 characters\n") { + /* CHECK ME argc referenced below */ int idx_word = 2; struct access_list *access; @@ -1712,6 +1715,7 @@ DEFUN (no_ipv6_access_list_remark_comment, "Access list entry comment\n" "Comment up to 100 characters\n") { + /* CHECK ME argc referenced below */ return no_ipv6_access_list_remark (self, vty, argc, argv); } diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c index 41fee1c1c..34e0b8106 100644 --- a/lib/grammar_sandbox.c +++ b/lib/grammar_sandbox.c @@ -57,6 +57,7 @@ DEFUN (grammar_test, GRAMMAR_STR "command to pass to new parser\n") { + /* CHECK ME argc referenced below */ // make a string from tokenized command line char *command = argv_concat (argv, argc, 0); @@ -80,6 +81,7 @@ DEFUN (grammar_test_complete, "attempt to complete input on DFA\n" "command to complete") { + /* CHECK ME argc referenced below */ char *cmdstr = argv_concat (argv, argc, 0); vector command = cmd_make_strvec (cmdstr); @@ -129,6 +131,7 @@ DEFUN (grammar_test_match, "attempt to match input on DFA\n" "command to match") { + /* CHECK ME argc referenced below */ if (argv[0][0] == '#') return CMD_SUCCESS; @@ -677,6 +677,7 @@ DEFUN (interface_desc, "Interface specific description\n" "Characters describing this interface\n") { + /* CHECK ME argc referenced below */ struct interface *ifp; if (argc == 1) @@ -755,6 +756,7 @@ DEFUN (interface, "Interface's name\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ifname = 1; const char *ifname = argv[idx_ifname]->arg; const char *vrfname = (argc > 2) ? argv[3]->arg : NULL; @@ -899,6 +901,7 @@ DEFUN (show_address, "address\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_vrf_cmd_str = 2; struct listnode *node; struct listnode *node2; diff --git a/lib/plist.c b/lib/plist.c index 0d1cafde6..4170230d8 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -1905,6 +1905,7 @@ DEFUN (ip_prefix_list_description, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { + /* CHECK ME argc referenced below */ int idx_word = 2; struct prefix_list *plist; @@ -1944,6 +1945,7 @@ DEFUN (no_ip_prefix_list_description_comment, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { + /* CHECK ME argc referenced below */ return no_ip_prefix_list_description (self, vty, argc, argv); } @@ -2616,6 +2618,7 @@ DEFUN (ipv6_prefix_list_description, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { + /* CHECK ME argc referenced below */ int idx_word = 2; struct prefix_list *plist; @@ -2655,6 +2658,7 @@ DEFUN (no_ipv6_prefix_list_description_comment, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { + /* CHECK ME argc referenced below */ return no_ipv6_prefix_list_description_comment (self, vty, argc, argv); } diff --git a/lib/routemap.c b/lib/routemap.c index 7ad75b415..2b4ec0c67 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -1544,6 +1544,7 @@ DEFUN (rmap_onmatch_goto, "Goto Clause number\n" "Number\n") { + /* CHECK ME argc referenced below */ int idx_number = 2; char *num = NULL; if (!strcmp (argv[0]->text, "continue")) @@ -1609,6 +1610,7 @@ DEFUN (rmap_continue, "Continue on a different entry within the route-map\n" "Route-map entry sequence number\n") { + /* CHECK ME argc referenced below */ return rmap_onmatch_goto (self, vty, argc, argv); } @@ -1620,6 +1622,7 @@ DEFUN (no_rmap_continue, "Continue on a different entry within the route-map\n" "Route-map entry sequence number\n") { + /* CHECK ME argc referenced below */ return no_rmap_onmatch_goto (self, vty, argc, argv); } @@ -1631,6 +1634,7 @@ DEFUN (rmap_show_name, "route-map information\n" "route-map name\n") { + /* CHECK ME argc referenced below */ int idx_word = 2; const char *name = (argc == 3) ? argv[idx_word]->arg : NULL; return vty_show_route_map (vty, name); @@ -1694,6 +1698,7 @@ DEFUN (rmap_description, "Route-map comment\n" "Comment describing this route-map rule\n") { + /* CHECK ME argc referenced below */ struct route_map_index *index; index = vty->index; diff --git a/lib/thread.c b/lib/thread.c index 76acd0778..eb85d57af 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -299,6 +299,7 @@ DEFUN (show_thread_cpu, "Thread CPU usage\n" "Display filter (rwtexb)\n") { + /* CHECK ME argc referenced below */ int idx_filter = 3; int i = 0; thread_type filter = (thread_type) -1U; @@ -382,6 +383,7 @@ DEFUN (clear_thread_cpu, "Thread CPU usage\n" "Display filter (rwtexb)\n") { + /* CHECK ME argc referenced below */ int idx_filter = 3; int i = 0; thread_type filter = (thread_type) -1U; @@ -2797,6 +2797,7 @@ DEFUN (no_vty_access_class, "Filter connections based on an IP access list\n" "IP access list\n") { + /* CHECK ME argc referenced below */ int idx_word = 2; const char *accesslist = (argc == 3) ? argv[idx_word]->arg : NULL; if (! vty_accesslist_name || (argc && strcmp(vty_accesslist_name, accesslist))) @@ -2840,6 +2841,7 @@ DEFUN (no_vty_ipv6_access_class, "Filter connections based on an IP access list\n" "IPv6 access list\n") { + /* CHECK ME argc referenced below */ int idx_word = 3; const char *accesslist = (argc == 4) ? argv[idx_word]->arg : NULL; @@ -2948,6 +2950,7 @@ DEFUN (no_terminal_monitor, "Set terminal line parameters\n" "Copy debug output to the current terminal line\n") { + /* CHECK ME argc referenced below */ return terminal_no_monitor (self, vty, argc, argv); } diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index d67621d7c..75c1bd2f6 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -468,6 +468,7 @@ DEFUN (area_range, "Specify IPv6 prefix\n" ) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 1; int idx_ipv6_prefixlen = 3; int ret; @@ -571,6 +572,7 @@ DEFUN (no_area_range, "Configured address range\n" "Specify IPv6 prefix\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int ret; struct ospf6_area *oa; @@ -680,6 +682,7 @@ DEFUN (area_filter_list, "Filter networks sent to this area\n" "Filter networks sent from this area\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 1; int idx_word = 4; struct ospf6_area *area; @@ -724,6 +727,7 @@ DEFUN (no_area_filter_list, "Filter networks sent to this area\n" "Filter networks sent from this area\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int idx_word = 5; struct ospf6_area *area; diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 379320e86..3798f85df 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -1142,6 +1142,7 @@ DEFUN (no_set_metric, SET_STR "Metric value for destination routing protocol\n") { + /* CHECK ME argc referenced below */ int ret = 0; if (argc == 0) diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index e9d66419d..e15fb9971 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -1006,6 +1006,7 @@ DEFUN (show_ipv6_ospf6_interface, IFNAME_STR ) { + /* CHECK ME argc referenced below */ int idx_ifname = 4; struct interface *ifp; struct listnode *i; @@ -1069,6 +1070,7 @@ DEFUN (show_ipv6_ospf6_interface_ifname_prefix, "Display connected prefixes to advertise\n" ) { + /* CHECK ME argc referenced below */ int idx_ifname = 4; struct interface *ifp; struct ospf6_interface *oi; @@ -1131,6 +1133,7 @@ DEFUN (show_ipv6_ospf6_interface_prefix, "Display connected prefixes to advertise\n" ) { + /* CHECK ME argc referenced below */ struct listnode *i; struct ospf6_interface *oi; struct interface *ifp; @@ -1990,6 +1993,7 @@ DEFUN (clear_ipv6_ospf6_interface, IFNAME_STR ) { + /* CHECK ME argc referenced below */ int idx_ifname = 4; struct interface *ifp; struct listnode *node; diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index a70e450f6..7aa78048d 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -835,6 +835,7 @@ DEFUN (debug_ospf6_lsa_type, "Specify LS type as Hexadecimal\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 3; unsigned int i; struct ospf6_lsa_handler *handler = NULL; @@ -893,6 +894,7 @@ DEFUN (no_debug_ospf6_lsa_type, "Specify LS type as Hexadecimal\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 4; u_int i; struct ospf6_lsa_handler *handler = NULL; diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index 2cedc59ee..8c4684081 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -2371,6 +2371,7 @@ DEFUN (debug_ospf6_message, "Debug All message\n" ) { + /* CHECK ME argc referenced below */ int idx_packet = 3; unsigned char level = 0; int type = 0; @@ -2450,6 +2451,7 @@ DEFUN (no_debug_ospf6_message, "Debug All message\n" ) { + /* CHECK ME argc referenced below */ int idx_packet = 4; unsigned char level = 0; int type = 0; diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index 76c3862ec..573fced39 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -848,6 +848,7 @@ DEFUN (show_ipv6_ospf6_neighbor, "Neighbor list\n" ) { + /* CHECK ME argc referenced below */ struct ospf6_neighbor *on; struct ospf6_interface *oi; struct ospf6_area *oa; @@ -945,6 +946,7 @@ DEFUN (debug_ospf6_neighbor, "Debug OSPFv3 Neighbor\n" ) { + /* CHECK ME argc referenced below */ unsigned char level = 0; if (argc) { @@ -982,6 +984,7 @@ DEFUN (no_debug_ospf6_neighbor, "Debug OSPFv3 Neighbor\n" ) { + /* CHECK ME argc referenced below */ unsigned char level = 0; if (argc) { diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index 3aa653814..659078353 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -885,6 +885,7 @@ DEFUN (ospf6_timers_throttle_spf, "Initial hold time (msec) between consecutive SPF calculations\n" "Maximum hold time (msec)\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; int idx_number_2 = 4; int idx_number_3 = 5; diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 5fef06d7c..49e136c99 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -405,6 +405,7 @@ DEFUN (ospf6_timers_lsa, "Minimum delay in receiving new version of a LSA\n" "Delay in milliseconds\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; unsigned int minarrival; struct ospf6 *ospf = vty->index; @@ -443,6 +444,7 @@ DEFUN (no_ospf6_timers_lsa, "OSPF6 LSA timers\n" "Minimum delay in receiving new version of a LSA\n") { + /* CHECK ME argc referenced below */ unsigned int minarrival; struct ospf6 *ospf = vty->index; @@ -816,6 +818,7 @@ DEFUN (show_ipv6_ospf6_route, ROUTE_STR ) { + /* CHECK ME argc referenced below */ OSPF6_CMD_CHECK_RUNNING (); ospf6_route_table_show (vty, argc, argv, ospf6->route_table); @@ -846,6 +849,7 @@ DEFUN (show_ipv6_ospf6_route_match, "Display routes which match the specified route\n" ) { + /* CHECK ME argc referenced below */ OSPF6_CMD_CHECK_RUNNING (); ospf6_route_table_show (vty, argc, argv, ospf6->route_table); @@ -864,6 +868,7 @@ DEFUN (show_ipv6_ospf6_route_match_detail, "Detailed information\n" ) { + /* CHECK ME argc referenced below */ OSPF6_CMD_CHECK_RUNNING (); ospf6_route_table_show (vty, argc, argv, ospf6->route_table); @@ -886,6 +891,7 @@ DEFUN (show_ipv6_ospf6_route_type_detail, "Detailed information\n" ) { + /* CHECK ME argc referenced below */ OSPF6_CMD_CHECK_RUNNING (); ospf6_route_table_show (vty, argc, argv, ospf6->route_table); diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index 6599fbc6c..44d1bbfaf 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -726,6 +726,7 @@ DEFUN (debug_ospf6_zebra_sendrecv, "Debug Receiving zebra\n" ) { + /* CHECK ME argc referenced below */ int idx_send_recv = 3; unsigned char level = 0; @@ -766,6 +767,7 @@ DEFUN (no_debug_ospf6_zebra_sendrecv, "Debug Receiving zebra\n" ) { + /* CHECK ME argc referenced below */ int idx_send_recv = 4; unsigned char level = 0; diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index b57228885..c67b0878c 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -187,6 +187,7 @@ DEFUN (show_ipv6_ospf6_database, "Display Link state database\n" ) { + /* CHECK ME argc referenced below */ int level; struct listnode *i, *j; struct ospf6 *o = ospf6; @@ -264,6 +265,7 @@ DEFUN (show_ipv6_ospf6_database_type, "Display Intra-Area-Prefix LSAs\n" ) { + /* CHECK ME argc referenced below */ int level; struct listnode *i, *j; struct ospf6 *o = ospf6; @@ -364,6 +366,7 @@ DEFUN (show_ipv6_ospf6_database_id, "Specify Link state ID as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 5; int level; struct listnode *i, *j; @@ -462,6 +465,7 @@ DEFUN (show_ipv6_ospf6_database_router, "Specify Advertising Router as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 6; int level; struct listnode *i, *j; @@ -598,6 +602,7 @@ DEFUN (show_ipv6_ospf6_database_type_id, "Specify Link state ID as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 4; int level; struct listnode *i, *j; @@ -754,6 +759,7 @@ DEFUN (show_ipv6_ospf6_database_type_router, "Specify Advertising Router as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 4; int level; struct listnode *i, *j; @@ -848,6 +854,7 @@ DEFUN (show_ipv6_ospf6_database_id_router, "Specify Advertising Router as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 5; int level; struct listnode *i, *j; @@ -935,6 +942,7 @@ DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id, "Specify Link state ID as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 5; int level; struct listnode *i, *j; @@ -1037,6 +1045,7 @@ DEFUN (show_ipv6_ospf6_database_type_id_router, "Specify Advertising Router as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 4; int level; struct listnode *i, *j; @@ -1162,6 +1171,7 @@ DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id, "Specify Link state ID as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 4; int level; struct listnode *i, *j; @@ -1259,6 +1269,7 @@ DEFUN (show_ipv6_ospf6_database_self_originated, "Display Self-originated LSAs\n" ) { + /* CHECK ME argc referenced below */ int level; struct listnode *i, *j; struct ospf6 *o = ospf6; @@ -1341,6 +1352,7 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated, "Display Self-originated LSAs\n" ) { + /* CHECK ME argc referenced below */ int level; struct listnode *i, *j; struct ospf6 *o = ospf6; @@ -1444,6 +1456,7 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id, "Specify Link state ID as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 4; int level; struct listnode *i, *j; @@ -1558,6 +1571,7 @@ DEFUN (show_ipv6_ospf6_database_type_id_self_originated, "Display Self-originated LSAs\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 4; int level; struct listnode *i, *j; @@ -1646,6 +1660,7 @@ DEFUN (show_ipv6_ospf6_border_routers, "Display routing table for ABR and ASBR\n" ) { + /* CHECK ME argc referenced below */ u_int32_t adv_router; void (*showfunc) (struct vty *, struct ospf6_route *); struct ospf6_route *ro; @@ -1724,6 +1739,7 @@ DEFUN (show_ipv6_ospf6_linkstate, "Display linkstate routing table\n" ) { + /* CHECK ME argc referenced below */ struct listnode *node; struct ospf6_area *oa; @@ -1751,6 +1767,7 @@ DEFUN (show_ipv6_ospf6_linkstate_detail, "Display linkstate routing table\n" ) { + /* CHECK ME argc referenced below */ struct listnode *node; struct ospf6_area *oa; diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index f2b332053..c55ce1de8 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -772,6 +772,7 @@ DEFUN (debug_ospf_packet, "Detail Information\n" "Detail Information\n") { + /* CHECK ME argc referenced below */ int inst = (argv[2]->type == RANGE_TKN) ? 1 : 0; int detail = strmatch (argv[argc - 1]->text, "detail"); int send = strmatch (argv[argc - (1+detail)]->text, "send"); @@ -849,6 +850,7 @@ DEFUN (no_debug_ospf_packet, "Detail Information\n" "Detail Information\n") { + /* CHECK ME argc referenced below */ int inst = (argv[3]->type == RANGE_TKN) ? 1 : 0; int detail = strmatch (argv[argc - 1]->text, "detail"); int send = strmatch (argv[argc - (1+detail)]->text, "send"); @@ -924,6 +926,7 @@ DEFUN (debug_ospf_ism, "ISM Event Information\n" "ISM TImer Information\n") { + /* CHECK ME argc referenced below */ int inst = (argv[2]->type == RANGE_TKN); char *dbgparam = (argc == 4 + inst) ? argv[argc - 1]->text : NULL; @@ -977,6 +980,7 @@ DEFUN (no_debug_ospf_ism, "ISM Event Information\n" "ISM TImer Information\n") { + /* CHECK ME argc referenced below */ int inst = (argv[3]->type == RANGE_TKN); char *dbgparam = (argc == 5 + inst) ? argv[argc - 1]->text : NULL; @@ -1073,6 +1077,7 @@ DEFUN (debug_ospf_nsm, OSPF_STR "OSPF Neighbor State Machine\n") { + /* CHECK ME argc referenced below */ return debug_ospf_nsm_common (vty, 0, argc, argv); } @@ -1097,6 +1102,7 @@ DEFUN (debug_ospf_instance_nsm, "Instance ID\n" "OSPF Neighbor State Machine\n") { + /* CHECK ME argc referenced below */ int idx_number = 2; u_short instance = 0; @@ -1164,6 +1170,7 @@ DEFUN (no_debug_ospf_nsm, OSPF_STR "OSPF Neighbor State Machine") { + /* CHECK ME argc referenced below */ return no_debug_ospf_nsm_common(vty, 0, argc, argv); } @@ -1190,6 +1197,7 @@ DEFUN (no_debug_ospf_instance_nsm, "Instance ID\n" "OSPF Neighbor State Machine") { + /* CHECK ME argc referenced below */ int idx_number = 3; u_short instance = 0; @@ -1261,6 +1269,7 @@ DEFUN (debug_ospf_lsa, OSPF_STR "OSPF Link State Advertisement\n") { + /* CHECK ME argc referenced below */ return debug_ospf_lsa_common(vty, 0, argc, argv); } @@ -1286,6 +1295,7 @@ DEFUN (debug_ospf_instance_lsa, "Instance ID\n" "OSPF Link State Advertisement\n") { + /* CHECK ME argc referenced below */ int idx_number = 2; u_short instance = 0; @@ -1358,6 +1368,7 @@ DEFUN (no_debug_ospf_lsa, OSPF_STR "OSPF Link State Advertisement\n") { + /* CHECK ME argc referenced below */ return no_debug_ospf_lsa_common (vty, 0, argc, argv); } @@ -1385,6 +1396,7 @@ DEFUN (no_debug_ospf_instance_lsa, "Instance ID\n" "OSPF Link State Advertisement\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; u_short instance = 0; @@ -1446,6 +1458,7 @@ DEFUN (debug_ospf_zebra, OSPF_STR "OSPF Zebra information\n") { + /* CHECK ME argc referenced below */ return debug_ospf_zebra_common(vty, 0, argc, argv); } @@ -1469,6 +1482,7 @@ DEFUN (debug_ospf_instance_zebra, "Instance ID\n" "OSPF Zebra information\n") { + /* CHECK ME argc referenced below */ int idx_number = 2; u_short instance = 0; @@ -1532,6 +1546,7 @@ DEFUN (no_debug_ospf_zebra, OSPF_STR "OSPF Zebra information\n") { + /* CHECK ME argc referenced below */ return no_debug_ospf_zebra_common(vty, 0, argc, argv); } @@ -1557,6 +1572,7 @@ DEFUN (no_debug_ospf_instance_zebra, "Instance ID\n" "OSPF Zebra information\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; u_short instance = 0; diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c index a1981be86..ecf883c69 100644 --- a/ospfd/ospf_opaque.c +++ b/ospfd/ospf_opaque.c @@ -792,6 +792,7 @@ DEFUN (ospf_opaque, "OSPF specific commands\n" "Enable the Opaque-LSA capability (rfc2370)\n") { + /* CHECK ME argc referenced below */ return capability_opaque (self, vty, argc, argv); } @@ -826,6 +827,7 @@ DEFUN (no_ospf_opaque, "OSPF specific commands\n" "Enable the Opaque-LSA capability (rfc2370)\n") { + /* CHECK ME argc referenced below */ return no_capability_opaque (self, vty, argc, argv); } diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c index bcb1cd8e2..463671f7d 100644 --- a/ospfd/ospf_ri.c +++ b/ospfd/ospf_ri.c @@ -1182,6 +1182,7 @@ DEFUN (router_info, "Enable the Router Information functionality with Area flooding scope\n" "OSPF area ID in IP format") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 2; char *area = (argc == 3) ? argv[idx_ipv4]->arg : NULL; diff --git a/ospfd/ospf_routemap.c b/ospfd/ospf_routemap.c index 33ddc67fc..1cb29f3ef 100644 --- a/ospfd/ospf_routemap.c +++ b/ospfd/ospf_routemap.c @@ -715,6 +715,7 @@ DEFUN (no_match_ip_nexthop, "IP access-list number (expanded range)\n" "IP access-list name\n") { + /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip next-hop", al); } @@ -744,6 +745,7 @@ DEFUN (no_match_ip_next_hop_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ char *pl = (argc == 6) ? argv[5]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip next-hop prefix-list", pl); } @@ -774,6 +776,7 @@ DEFUN (no_match_ip_address, "IP access-list number (expanded range)\n" "IP access-list name\n") { + /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip address", al); } @@ -802,6 +805,7 @@ DEFUN (no_match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ char *pl = (argc == 6) ? argv[5]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip address prefix-list", pl); } @@ -825,6 +829,7 @@ DEFUN (no_match_interface, "Match first hop interface of route\n" "Interface name\n") { + /* CHECK ME argc referenced below */ char *iface = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "interface", iface); } @@ -848,6 +853,7 @@ DEFUN (no_match_tag, "Match tag of route\n" "Tag value\n") { + /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "tag", tag); } @@ -871,6 +877,7 @@ DEFUN (no_set_metric, "Metric value for destination routing protocol\n" "Metric value\n") { + /* CHECK ME argc referenced below */ char *mval = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_set_delete (vty, vty->index, "metric", mval); } @@ -896,6 +903,7 @@ DEFUN (no_set_metric_type, "OSPF[6] external type 1 metric\n" "OSPF[6] external type 2 metric\n") { + /* CHECK ME argc referenced below */ char *ext = (argc == 4) ? argv[3]->text : NULL; return ospf_route_set_delete (vty, vty->index, "metric-type", ext); } @@ -919,6 +927,7 @@ DEFUN (no_set_tag, "Tag value for routing protocol\n" "Tag value\n") { + /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_set_delete (vty, vty->index, "tag", tag); } diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 2044500f1..ac9f9c7d3 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -2620,6 +2620,7 @@ DEFUN (show_ip_ospf_mpls_te_link, "Interface information\n" "Interface name\n") { + /* CHECK ME argc referenced below */ int idx_interface = 5; struct interface *ifp; struct listnode *node, *nnode; diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index b27088366..bf68e3a51 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -2534,6 +2534,7 @@ DEFUN (ip_ssmpingd, CONF_SSMPINGD_STR "Source address\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int result; struct in_addr source_addr; @@ -2564,6 +2565,7 @@ DEFUN (no_ip_ssmpingd, CONF_SSMPINGD_STR "Source address\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 3; int result; struct in_addr source_addr; @@ -3560,6 +3562,7 @@ DEFUN (interface_ip_pim_hello, IFACE_PIM_HELLO_TIME_STR IFACE_PIM_HELLO_HOLD_STR) { + /* CHECK ME argc referenced below */ int idx_time = 3; int idx_hold = 4; struct interface *ifp; @@ -4052,6 +4055,7 @@ DEFUN (test_igmp_receive_report, "Record type\n" "Sources\n") { + /* CHECK ME argc referenced below */ int idx_number = 4; int idx_ipv4 = 5; int idx_number_2 = 6; @@ -4167,6 +4171,7 @@ DEFUN (test_pim_receive_dump, "Neighbor address\n" "Packet dump\n") { + /* CHECK ME argc referenced below */ int idx_interface = 4; int idx_ipv4 = 5; uint8_t buf[1000]; @@ -4287,6 +4292,7 @@ DEFUN (test_pim_receive_hello, "Neighbor LAN prune delay T-bit\n" "Neighbor secondary addresses\n") { + /* CHECK ME argc referenced below */ int idx_interface = 4; int idx_ipv4 = 5; int idx_number = 6; diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index d6686399c..6b2fef7f5 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -1528,6 +1528,7 @@ DEFUN (ip_rip_authentication_mode, "RFC compatible\n" "Old ripd compatible\n") { + /* CHECK ME argc referenced below */ char *cryptmode = argv[4]->text; char *authlen = (argc > 5) ? argv[6]->text : NULL; struct interface *ifp; diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c index e1017cfb2..e43c398c4 100644 --- a/ripd/rip_routemap.c +++ b/ripd/rip_routemap.c @@ -754,6 +754,7 @@ DEFUN (no_match_metric, "Match metric of route\n" "Metric value\n") { + /* CHECK ME argc referenced below */ char *mval = (argc == 4) ? argv[3]->arg : NULL; return rip_route_match_delete (vty, vty->index, "metric", mval); } @@ -778,6 +779,7 @@ DEFUN (no_match_interface, "Match first hop interface of route\n" "Interface name\n") { + /* CHECK ME argc referenced below */ char *iface = (argc == 4) ? argv[3]->arg : NULL; return rip_route_match_delete (vty, vty->index, "interface", iface); } @@ -807,6 +809,7 @@ DEFUN (no_match_ip_next_hop, "IP access-list number (expanded range)\n" "IP Access-list name\n") { + /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return rip_route_match_delete (vty, vty->index, "ip next-hop", al); } @@ -834,6 +837,7 @@ DEFUN (no_match_ip_next_hop_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ char *plist = (argc == 6) ? argv[5]->arg : NULL; return rip_route_match_delete (vty, vty->index, "ip next-hop prefix-list", plist); } @@ -865,6 +869,7 @@ DEFUN (no_match_ip_address, "IP access-list number (expanded range)\n" "IP Access-list name\n") { + /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return rip_route_match_delete (vty, vty->index, "ip address", al); } @@ -893,6 +898,7 @@ DEFUN (no_match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ char *plist = (argc == 6) ? argv[5]->arg : NULL; return rip_route_match_delete (vty, vty->index, "ip address prefix-list", plist); } @@ -917,6 +923,7 @@ DEFUN (no_match_tag, "Match tag of route\n" "Metric value\n") { + /* CHECK ME argc referenced below */ char *mval = (argc == 4) ? argv[3]->arg : NULL; return rip_route_match_delete (vty, vty->index, "tag", mval); } @@ -989,6 +996,7 @@ DEFUN (no_set_ip_nexthop, "Next hop address\n" "IP address of next hop\n") { + /* CHECK ME argc referenced below */ char *addr = (argc == 5) ? argv[4]->arg : NULL; return rip_route_set_delete (vty, vty->index, "ip next-hop", addr); } @@ -1013,6 +1021,7 @@ DEFUN (no_set_tag, "Tag value for routing protocol\n" "Tag value\n") { + /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return rip_route_set_delete (vty, vty->index, "tag", tag); } diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c index 6ecf08466..52aae9aff 100644 --- a/ripngd/ripng_routemap.c +++ b/ripngd/ripng_routemap.c @@ -519,6 +519,7 @@ DEFUN (no_match_metric, "Match metric of route\n" "Metric value\n") { + /* CHECK ME argc referenced below */ char *mval = (argc == 4) ? argv[3]->arg : NULL; return ripng_route_match_delete (vty, vty->index, "metric", mval); } @@ -543,6 +544,7 @@ DEFUN (no_match_interface, "Match first hop interface of route\n" "Interface name\n") { + /* CHECK ME argc referenced below */ char *iface = (argc == 4) ? argv[3]->arg : NULL; return ripng_route_match_delete (vty, vty->index, "interface", iface); } @@ -567,6 +569,7 @@ DEFUN (no_match_tag, "Match tag of route\n" "Metric value\n") { + /* CHECK ME argc referenced below */ char *mval = (argc == 4) ? argv[3]->arg : NULL; return ripng_route_match_delete (vty, vty->index, "tag", mval); } @@ -593,6 +596,7 @@ DEFUN (no_set_metric, "Metric value for destination routing protocol\n" "Metric value\n") { + /* CHECK ME argc referenced below */ char *mval = (argc == 4) ? argv[3]->arg : NULL; return ripng_route_set_delete (vty, vty->index, "metric", mval); } @@ -637,6 +641,7 @@ DEFUN (no_set_ipv6_nexthop_local, "IPv6 local address\n" "IPv6 address of next hop\n") { + /* CHECK ME argc referenced below */ char *addr = (argc == 6) ? argv[5]->arg : NULL; return ripng_route_set_delete (vty, vty->index, "ipv6 next-hop local", addr); } @@ -661,6 +666,7 @@ DEFUN (no_set_tag, "Tag value for routing protocol\n" "Tag value\n") { + /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return ripng_route_set_delete (vty, vty->index, "tag", tag); } diff --git a/tools/argv_translator.py b/tools/argv_translator.py index 523954a6f..6c0d20b80 100755 --- a/tools/argv_translator.py +++ b/tools/argv_translator.py @@ -718,6 +718,18 @@ DEFUN (no_bgp_maxmed_onstartup, return used + def uses_argc(self): + for line in self.guts: + if 'CHECK ME argc referenced below' in line: + return False + + if 'use_json (argc, argv)' in line: + continue + + if 'argc' in line: + return True + return False + def dump(self): new_command_string = self.get_new_command_string() new_command_string_expanded = expand_command_string(new_command_string) @@ -730,6 +742,8 @@ DEFUN (no_bgp_maxmed_onstartup, lines.extend(self.help_strings) lines.append('{\n') + if self.uses_argc(): + lines.append(" /* CHECK ME argc referenced below */\n") lines.extend(self.guts) ''' diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index e6aebd6b1..44985adbf 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1732,6 +1732,7 @@ DEFUN (vtysh_show_thread, "Thread CPU usage\n" "Display filter (rwtexb)\n") { + /* CHECK ME argc referenced below */ unsigned int i; int ret = CMD_SUCCESS; char line[100]; @@ -2176,6 +2177,7 @@ DEFUN (vtysh_write_terminal, "Write running configuration to memory, network, or terminal\n" "Write to terminal\n") { + /* CHECK ME argc referenced below */ u_int i; char line[] = "write terminal\n"; FILE *fp = NULL; diff --git a/zebra/interface.c b/zebra/interface.c index 676b6ed0d..f49ab4903 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1305,6 +1305,7 @@ DEFUN (show_interface, "Interface status and configuration\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ struct listnode *node; struct interface *ifp; vrf_id_t vrf_id = VRF_DEFAULT; @@ -1354,6 +1355,7 @@ DEFUN (show_interface_name_vrf, "Interface name\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ifname = 2; int idx_name = 4; struct interface *ifp; @@ -1463,6 +1465,7 @@ DEFUN (show_interface_desc, "Interface description\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 3) @@ -2080,6 +2083,7 @@ DEFUN (link_params_delay, "Maximum delay\n" "Maximum delay in micro-second as decimal (0...16777215)\n") { + /* CHECK ME argc referenced below */ /* Get and Check new delay values */ u_int32_t delay = 0, low = 0, high = 0; VTY_GET_ULONG("delay", delay, argv[1]->arg); diff --git a/zebra/router-id.c b/zebra/router-id.c index 23b8cc743..80ad0afa6 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -221,6 +221,7 @@ DEFUN (router_id, "IP address to use for router-id\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 1; int idx_name = 3; @@ -250,6 +251,7 @@ DEFUN (no_router_id, "IP address to use for router-id\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_name = 4; struct prefix rid; diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 7edba5595..277cf4f06 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -1342,6 +1342,7 @@ DEFUN (ipv6_nd_prefix, "Do not use prefix for autoconfiguration\n" "Do not use prefix for onlink determination\n") { + /* CHECK ME argc referenced below */ /* prelude */ char *prefix = argv[3]->arg; int lifetimes = (argc > 4) && (argv[4]->type == RANGE_TKN || strmatch (argv[4]->text, "infinite")); diff --git a/zebra/test_main.c b/zebra/test_main.c index 4dd3e897f..0e850f162 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -124,6 +124,7 @@ DEFUN (test_interface_state, "up\n" "down\n") { + /* CHECK ME argc referenced below */ int idx_up_down = 1; struct interface *ifp; if (argc < 1) diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 6b861d780..87dc85dd2 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -314,6 +314,7 @@ DEFUN (no_match_interface, "Match first hop interface of route\n" "Interface name\n") { + /* CHECK ME argc referenced below */ char *iface = (argc == 4) ? argv[3]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "interface", iface, RMAP_EVENT_MATCH_DELETED); } @@ -338,6 +339,7 @@ DEFUN (no_match_tag, MATCH_STR "Match tag of route\n") { + /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "tag", tag, RMAP_EVENT_MATCH_DELETED); } @@ -368,6 +370,7 @@ DEFUN (no_match_ip_next_hop, "IP access-list number (expanded range)\n" "IP Access-list name\n") { + /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip next-hop", al, RMAP_EVENT_FILTER_DELETED); } @@ -397,6 +400,7 @@ DEFUN (no_match_ip_next_hop_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ char *plist = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip next-hop prefix-list", plist, @@ -431,6 +435,7 @@ DEFUN (no_match_ip_address, "IP access-list number (expanded range)\n" "IP Access-list name\n") { + /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip address", al, RMAP_EVENT_FILTER_DELETED); } @@ -460,6 +465,7 @@ DEFUN (no_match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ char *plist = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip address prefix-list", plist, @@ -489,6 +495,7 @@ DEFUN (no_match_ip_address_prefix_len, "Match prefixlen of ip address of route\n" "Prefix length\n") { + /* CHECK ME argc referenced below */ char *plen = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip address prefix-len", plen, @@ -519,6 +526,7 @@ DEFUN (no_match_ip_nexthop_prefix_len, "Match prefix length of nexthop\n" "Prefix length\n") { + /* CHECK ME argc referenced below */ char *plen = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip next-hop prefix-len", plen, @@ -552,6 +560,7 @@ DEFUN (no_match_source_protocol, "No match protocol via which the route was learnt\n" ) { + /* CHECK ME argc referenced below */ char *proto = (argc == 4) ? argv[3]->text : NULL; return zebra_route_match_delete (vty, vty->index, "source-protocol", proto, RMAP_EVENT_MATCH_DELETED); } @@ -625,6 +634,7 @@ DEFUN (no_set_src, SET_STR "Source address for route\n") { + /* CHECK ME argc referenced below */ char *ip = (argc == 4) ? argv[3]->arg : NULL; return zebra_route_set_delete (vty, vty->index, "src", ip); } @@ -708,6 +718,7 @@ DEFUN (no_ip_protocol, "Specify route map\n" "Route map name\n") { + /* CHECK ME argc referenced below */ char *proto = argv[3]->text; char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; @@ -818,6 +829,7 @@ DEFUN (no_ipv6_protocol, "Specify route map\n" "Route map name\n") { + /* CHECK ME argc referenced below */ const char *proto = argv[3]->text; const char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; @@ -924,6 +936,7 @@ DEFUN (no_ip_protocol_nht_rmap, "Specify route map\n" "Route map name\n") { + /* CHECK ME argc referenced below */ char *proto = argv[3]->text; char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; @@ -1019,6 +1032,7 @@ DEFUN (no_ipv6_protocol_nht_rmap, "Specify route map\n" "Route map name\n") { + /* CHECK ME argc referenced below */ char *proto = argv[3]->text; char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index ddcffb5d4..b57634a8f 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -191,6 +191,7 @@ DEFUN (ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { + /* CHECK ME argc referenced below */ char *destprefix = argv[2]->arg; char *nexthop = argv[3]->arg; char *distance = (argc == 5) ? argv[4]->arg : NULL; @@ -208,6 +209,7 @@ DEFUN (no_ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { + /* CHECK ME argc referenced below */ char *destprefix = argv[2]->arg; char *nexthop = argv[3]->arg; char *distance = (argc == 5) ? argv[4]->arg : NULL; @@ -351,6 +353,7 @@ DEFUN (ip_route, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 2; int idx_ipv4_ifname_null = 3; int idx_curr = 4; @@ -382,6 +385,7 @@ DEFUN (ip_route_flags, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 2; int idx_ipv4_ifname = 3; int idx_reject_blackhole = 4; @@ -412,6 +416,7 @@ DEFUN (ip_route_flags2, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 2; int idx_reject_blackhole = 3; int idx_curr = 4; @@ -444,6 +449,7 @@ DEFUN (ip_route_mask, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int idx_ipv4_2 = 3; int idx_ipv4_ifname_null = 4; @@ -476,6 +482,7 @@ DEFUN (ip_route_mask_flags, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int idx_ipv4_2 = 3; int idx_ipv4_ifname = 4; @@ -509,6 +516,7 @@ DEFUN (ip_route_mask_flags2, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int idx_ipv4_2 = 3; int idx_reject_blackhole = 4; @@ -541,6 +549,7 @@ DEFUN (no_ip_route, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 3; int idx_ipv4_ifname_null = 4; int idx_curr = 5; @@ -571,6 +580,7 @@ DEFUN (no_ip_route_flags2, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 3; int idx_curr = 5; char *tag, *distance, *vrf; @@ -600,6 +610,7 @@ DEFUN (no_ip_route_mask, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 3; int idx_ipv4_2 = 4; int idx_ipv4_ifname_null = 5; @@ -632,6 +643,7 @@ DEFUN (no_ip_route_mask_flags2, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 3; int idx_ipv4_2 = 4; int idx_curr = 6; @@ -663,6 +675,7 @@ DEFUN (no_ip_route_flags, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 3; int idx_ipv4_ifname = 4; int idx_reject_blackhole = 5; @@ -697,6 +710,7 @@ DEFUN (no_ip_route_mask_flags, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 3; int idx_ipv4_2 = 4; int idx_ipv4_ifname = 5; @@ -1139,6 +1153,7 @@ DEFUN (show_ip_route, IP_STR "IP routing table\n") { + /* CHECK ME argc referenced below */ return do_show_ip_route (vty, VRF_DEFAULT_NAME, SAFI_UNICAST, use_json(argc, argv)); } @@ -1234,6 +1249,7 @@ DEFUN (show_ip_route_vrf, "IP routing table\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_json = 5; u_char uj = use_json(argc, argv); @@ -1251,6 +1267,7 @@ DEFUN (show_ip_nht, "IP nexthop tracking table\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_vrf = 4; vrf_id_t vrf_id = VRF_DEFAULT; @@ -1291,6 +1308,7 @@ DEFUN (show_ipv6_nht, "IPv6 nexthop tracking table\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_vrf = 4; vrf_id_t vrf_id = VRF_DEFAULT; @@ -2507,6 +2525,7 @@ DEFUN (ipv6_route, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 2; int idx_ipv6_ifname = 3; int idx_curr = 4; @@ -2539,6 +2558,7 @@ DEFUN (ipv6_route_flags, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 2; int idx_ipv6_ifname = 3; int idx_reject_blackhole = 4; @@ -2569,6 +2589,7 @@ DEFUN (ipv6_route_ifname, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 2; int idx_ipv6 = 3; int idx_interface = 4; @@ -2601,6 +2622,7 @@ DEFUN (ipv6_route_ifname_flags, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 2; int idx_ipv6 = 3; int idx_interface = 4; @@ -2633,6 +2655,7 @@ DEFUN (no_ipv6_route, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 3; int idx_ipv6_ifname = 4; int idx_curr = 5; @@ -2664,6 +2687,7 @@ DEFUN (no_ipv6_route_flags, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 3; int idx_ipv6_ifname = 4; int idx_reject_blackhole = 5; @@ -2695,6 +2719,7 @@ DEFUN (no_ipv6_route_ifname, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 3; int idx_ipv6 = 4; int idx_interface = 5; @@ -2728,6 +2753,7 @@ DEFUN (no_ipv6_route_ifname_flags, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 3; int idx_ipv6 = 4; int idx_interface = 5; @@ -2755,6 +2781,7 @@ DEFUN (show_ipv6_route, VRF_CMD_HELP_STR "Output JSON\n") { + /* CHECK ME argc referenced below */ struct route_table *table; struct route_node *rn; struct rib *rib; @@ -2955,6 +2982,7 @@ DEFUN (show_ipv6_route_protocol, VRF_CMD_HELP_STR QUAGGA_IP6_REDIST_HELP_STR_ZEBRA) { + /* CHECK ME argc referenced below */ int type; struct route_table *table; struct route_node *rn; @@ -3699,6 +3727,7 @@ DEFUN (ip_zebra_import_table_distance, "route-map for filtering\n" "route-map name\n") { + /* CHECK ME argc referenced below */ u_int32_t table_id = 0; VTY_GET_INTEGER("table", table_id, argv[2]->arg); |