From: David Lamparter Date: Thu, 16 Mar 2023 10:00:02 +0000 (+0100) Subject: bgpd: fix NULL argument warning X-Git-Tag: base_9.0~302^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4b216f58dcbecbc190d0f35afaa91df82b28ae84;p=matthieu%2Ffrr.git bgpd: fix NULL argument warning gcc 12.2.0 complains `error: ā€˜%s’ directive argument is null`, even though all enum values are covered with a string. Let's just go with a `???` default. Signed-off-by: David Lamparter --- diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index fb7b998777..f90668d854 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -2817,7 +2817,7 @@ const char *print_peer_gr_cmd(enum peer_gr_command pr_gr_cmd) const char *print_global_gr_mode(enum global_mode gl_mode) { - const char *global_gr_mode = NULL; + const char *global_gr_mode = "???"; switch (gl_mode) { case GLOBAL_HELPER: