Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kconfig: check prompt for choice while parsing

This can be checked on-the-fly.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

+6 -3
-3
scripts/kconfig/menu.c
··· 561 561 if (sym->type == S_UNKNOWN) 562 562 menu_warn(parent, "config symbol defined without type"); 563 563 564 - if (sym_is_choice(sym) && !parent->prompt) 565 - menu_warn(parent, "choice must have a prompt"); 566 - 567 564 /* Check properties connected to this symbol */ 568 565 sym_check_prop(sym); 569 566 sym->flags |= SYMBOL_WARNED;
+6
scripts/kconfig/parser.y
··· 233 233 234 234 choice_entry: choice choice_option_list 235 235 { 236 + if (!current_entry->prompt) { 237 + fprintf(stderr, "%s:%d: error: choice must have a prompt\n", 238 + current_entry->filename, current_entry->lineno); 239 + yynerrs++; 240 + } 241 + 236 242 $$ = menu_add_menu(); 237 243 }; 238 244