From: Anthony PERARD Date: Fri, 25 Feb 2022 10:03:44 +0000 (+0100) Subject: xen/tools/kconfig: fix build with -Wdeclaration-after-statement X-Git-Tag: archive/raspbian/4.17.0-1+rpi1^2~33^2~898 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5c5e10129830bdd8871bd8a458d2ef1813392273;p=xen.git xen/tools/kconfig: fix build with -Wdeclaration-after-statement We are going to start building kconfig with HOSTCFLAGS from Config.mk, it has the flag "-Wdeclaration-after-statement". Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- diff --git a/xen/tools/kconfig/confdata.c b/xen/tools/kconfig/confdata.c index 3569d2dec3..a69250c913 100644 --- a/xen/tools/kconfig/confdata.c +++ b/xen/tools/kconfig/confdata.c @@ -1237,6 +1237,7 @@ void set_all_choice_values(struct symbol *csym) bool conf_set_all_new_symbols(enum conf_def_mode mode) { + bool has_changed = false; struct symbol *sym, *csym; int i, cnt, pby, pty, ptm; /* pby: probability of bool = y * pty: probability of tristate = y @@ -1283,7 +1284,6 @@ bool conf_set_all_new_symbols(enum conf_def_mode mode) exit( 1 ); } } - bool has_changed = false; for_all_symbols(i, sym) { if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID))