diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2024-03-10 22:45:15 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-03-19 02:30:51 +0900 |
commit | 4957515b9c3aa3d32a1ee44ab77f0a44f29263dc (patch) | |
tree | d2d04026aae26fe5d7918b0bbc39fc9aca350925 /scripts/kconfig/parser.y | |
parent | c33a4315c4095be368fe127db3385b248d38df8f (diff) |
kconfig: check prompt for choice while parsing
This can be checked on-the-fly.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/parser.y')
-rw-r--r-- | scripts/kconfig/parser.y | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/kconfig/parser.y b/scripts/kconfig/parser.y index 22f616334585..b45bfaf0a02b 100644 --- a/scripts/kconfig/parser.y +++ b/scripts/kconfig/parser.y @@ -233,6 +233,12 @@ choice: T_CHOICE T_EOL choice_entry: choice choice_option_list { + if (!current_entry->prompt) { + fprintf(stderr, "%s:%d: error: choice must have a prompt\n", + current_entry->filename, current_entry->lineno); + yynerrs++; + } + $$ = menu_add_menu(); }; |