Don't use the uninitialized 'parsed_cmdline_options' variable
authorAlexander Popov <alex.popov@linux.com>
Sat, 4 Feb 2023 11:57:54 +0000 (14:57 +0300)
committerAlexander Popov <alex.popov@linux.com>
Sat, 4 Feb 2023 11:57:54 +0000 (14:57 +0300)
kconfig_hardened_check/__init__.py

index a3a3293797e2c4ba0bba5906e5c7dd2dcf613a41..973f0a7b0c06f99ae98e3b1b0e49bd6744095490 100644 (file)
@@ -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