Skip to content

Commit a5b05ec

Browse files
eqvinoxmergify[bot]
authored andcommitted
ospf6d: fix uninitialized warnings
GCC 13.2.0 complains: ``` ospf6d/ospf6_intra.c:139:25: error: ‘json_arr’ may be used uninitialized [-Werror=maybe-uninitialized] ospf6d/ospf6_intra.c:485:20: error: ‘json_arr’ may be used uninitialized [-Werror=maybe-uninitialized] ``` Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit 55bbef1)
1 parent bf5ee72 commit a5b05ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ospf6d/ospf6_intra.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static int ospf6_router_lsa_show(struct vty *vty, struct ospf6_lsa *lsa,
102102
char buf[32], name[32], bits[16], options[32];
103103
struct ospf6_router_lsa *router_lsa;
104104
struct ospf6_router_lsdesc *lsdesc;
105-
json_object *json_arr;
105+
json_object *json_arr = NULL;
106106
json_object *json_loop;
107107

108108
router_lsa =
@@ -475,7 +475,7 @@ static int ospf6_network_lsa_show(struct vty *vty, struct ospf6_lsa *lsa,
475475
struct ospf6_network_lsa *network_lsa;
476476
struct ospf6_network_lsdesc *lsdesc;
477477
char buf[128], options[32];
478-
json_object *json_arr;
478+
json_object *json_arr = NULL;
479479

480480
network_lsa =
481481
(struct ospf6_network_lsa *)((caddr_t)lsa->header

0 commit comments

Comments
 (0)