xen/tools/kconfig: fix build with -Wdeclaration-after-statement
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 25 Feb 2022 10:03:44 +0000 (11:03 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 25 Feb 2022 10:03:44 +0000 (11:03 +0100)
We are going to start building kconfig with HOSTCFLAGS from Config.mk,
it has the flag "-Wdeclaration-after-statement".

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/tools/kconfig/confdata.c

index 3569d2dec37cebfc1e3eabd615d99ae706350454..a69250c9135508d4b1e78c9f98f2868081f2ccc5 100644 (file)
@@ -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))