From 090dcf7a6c7e25b15f4accdcf434528b36342be7 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 16 Mar 2023 11:00:02 +0100 Subject: [PATCH] bgpd: fix NULL argument warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- bgpd/bgp_fsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index 82487cf1f56f..20c9b558bff6 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -2805,7 +2805,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: