From: Alexander Popov Date: Sat, 4 Feb 2023 11:57:54 +0000 (+0300) Subject: Don't use the uninitialized 'parsed_cmdline_options' variable X-Git-Tag: v0.6.6~249 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=275c52ad5f37bde77298c2f98616f0149ab1711f;p=kconfig-hardened-check.git Don't use the uninitialized 'parsed_cmdline_options' variable --- 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