From b3d165f3c2ed2d42ce7e01267ed8a341fb6fda0c Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Fri, 20 Jul 2018 18:04:30 +0200 Subject: [PATCH] scripts: kconfig: Handle warnings generated during evaluation Warnings generated during symbol evaluation were accidentally ignored, due to checking for warnings before writing .config and autoconf.h (which indirectly evaluates all symbols). Move the warning checking code to after writing the configuration to catch such warnings. kconfig.py still gets rerun if any warnings-turned-errors show up. Signed-off-by: Ulf Magnusson --- scripts/kconfig/kconfig.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/kconfig/kconfig.py b/scripts/kconfig/kconfig.py index b33afde2bdd..883dd1fd992 100755 --- a/scripts/kconfig/kconfig.py +++ b/scripts/kconfig/kconfig.py @@ -58,6 +58,13 @@ def main(): kconf.load_config(config, replace=False) + # Write the merged configuration and the C header. This will evaluate all + # symbols, which might generate additional warnings, so do it before + # checking for warnings. + kconf.write_config(args.dotconfig) + kconf.write_autoconf(args.autoconf) + + # Print warnings for symbols whose actual value doesn't match the assigned # value for sym in kconf.defined_syms: @@ -93,13 +100,6 @@ def main(): .format(warning, sys.argv[0])) - # Write the merged configuration - kconf.write_config(args.dotconfig) - - # Write the C header - kconf.write_autoconf(args.autoconf) - - # Message printed when a promptless symbol is assigned (and doesn't get the # assigned value) PROMPTLESS_HINT = """