]> git.proxmox.com Git - mirror_frr.git/commitdiff
build: fix -Wmaybe-uninitialized warnings
authorDavid Lamparter <equinox@opensourcerouting.org>
Tue, 15 Nov 2016 02:17:50 +0000 (11:17 +0900)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 15 Nov 2016 02:17:50 +0000 (11:17 +0900)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_vty.c
lib/bitfield.h
lib/command.c

index 4232ff8d9afa3b0182534c24458a36d1ce6c9536..4164318220408a5c49e6f7e2fda36e78356393da 100644 (file)
@@ -13660,6 +13660,8 @@ bgp_show_one_peer_group (struct vty *vty, struct peer_group *group)
         af_str = "IPv4";
       else if (afi == AFI_IP6)
         af_str = "IPv6";
+      else
+        af_str = "???";
       lr_count = listcount(group->listen_range[afi]);
       if (lr_count)
         {
index b3f40a948b5abcaca2bd7cdadbc03e9a8294c917..5bf2c8bd068ee8771acb17eb733c414f3068da96 100644 (file)
@@ -86,7 +86,7 @@ typedef unsigned int word_t;
 /* Find a clear bit in v and assign it to b. */
 #define bf_find_bit(v, b)                                      \
   do {                                                         \
-    word_t word;                                               \
+    word_t word = 0;                                           \
     unsigned int w, sh;                                                \
     for (w = 0; w <= (v).n; w++) {                             \
       if ((word = (v).data[w]) != WORD_MAX) break;             \
index e8ba63762300d677e58ac594b64c6252e24b696c..cfadfcef62a715321030400b115b2f865cb666a9 100644 (file)
@@ -2089,7 +2089,7 @@ cmd_describe_command_real (vector vline, struct vty *vty, int *status)
   unsigned int index;
   int ret;
   enum match_type match;
-  char *command;
+  char *command = NULL;
   vector matches = NULL;
   vector match_vector;
   uint32_t command_found = 0;