From a1d0e58b06c1b464d587996143c6257656d93e6b Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 23 Oct 2024 15:10:45 +0200 Subject: [PATCH] BUILD: spoe: fix build warning on older gcc around sub-struct initialization gcc-4.8 is unhappy with the cfg_file initialization: src/flt_spoe.c: In function 'parse_spoe_flt': src/flt_spoe.c:2202:9: warning: missing braces around initializer [-Wmissing-braces] struct cfgfile cfg_file = {0}; ^ src/flt_spoe.c:2202:9: warning: (near initialization for 'cfg_file.list') [-Wmissing-braces] This is due to the embedded list member. Initializing it to empty like we do almost everywhere else makes it happy. No backport is needed as this was changed in 3.1-dev5 only. --- src/flt_spoe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flt_spoe.c b/src/flt_spoe.c index 61291e7f2..49ff89665 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -2199,7 +2199,7 @@ static int parse_spoe_flt(char **args, int *cur_arg, struct proxy *px, struct spoe_group *grp, *grpback; struct spoe_placeholder *ph, *phback; struct spoe_var_placeholder *vph, *vphback; - struct cfgfile cfg_file = {0}; + struct cfgfile cfg_file = { }; struct logger *logger, *loggerback; char *file = NULL, *engine = NULL; int ret, pos = *cur_arg + 1;