From 275c52ad5f37bde77298c2f98616f0149ab1711f Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sat, 4 Feb 2023 14:57:54 +0300 Subject: [PATCH] Don't use the uninitialized 'parsed_cmdline_options' variable --- kconfig_hardened_check/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index a3a3293..973f0a7 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -1108,7 +1108,8 @@ def main(): if mode == 'verbose': # print the parsed options without the checks (for debugging) all_parsed_options = parsed_kconfig_options # assignment does not copy - all_parsed_options.update(parsed_cmdline_options) + if args.cmdline: + all_parsed_options.update(parsed_cmdline_options) print_unknown_options(config_checklist, all_parsed_options) # finally print the results -- 2.31.1