From: David Lamparter Date: Tue, 29 Nov 2016 12:42:06 +0000 (+0100) Subject: *: fix "uninitialized" warnings X-Git-Tag: frr-3.0-branchpoint~138 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=ef736f12bab519bb0aa4e8e0d55af0d14f0e163f;p=matthieu%2Ffrr.git *: fix "uninitialized" warnings reported by clang for: - cmd_complete_command() - show_ip_bgp_ipv4() Signed-off-by: David Lamparter --- diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index e52aad2b9e..6af7aced1f 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -7898,7 +7898,7 @@ DEFUN (show_ip_bgp_ipv4, char *vrf = NULL; afi_t afi = AFI_IP6; safi_t safi = SAFI_UNICAST; - int exact_match; + int exact_match = 0; enum bgp_show_type sh_type = bgp_show_type_normal; int idx = 0; diff --git a/lib/command.c b/lib/command.c index bf7e269acc..3c429ce1a7 100644 --- a/lib/command.c +++ b/lib/command.c @@ -671,7 +671,7 @@ cmd_complete_command (vector vline, struct vty *vty, int *status) vector_set_index (input_line, index + offset, vector_lookup (vline, index)); // get token completions -- this is a copying operation - vector comps, initial_comps; + vector comps = NULL, initial_comps; initial_comps = cmd_complete_command_real (input_line, vty, status); if (!MATCHER_ERROR (*status))