diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2024-09-30 02:32:38 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-11-04 17:53:09 +0900 |
commit | 6971f7192c12043667173cc78fe88d52ff7ee488 (patch) | |
tree | f68458c9cd2103f2b39b4f3425dcb7efefe0edd9 /scripts | |
parent | bea2c5ef789a37bace99f2f45eeef3be4559b228 (diff) |
kconfig: remove zconfprint()
Turn all warnings during parsing into hard errors.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/parser.y | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/scripts/kconfig/parser.y b/scripts/kconfig/parser.y index f0f17b21d1b5..68372d3ff325 100644 --- a/scripts/kconfig/parser.y +++ b/scripts/kconfig/parser.y @@ -24,7 +24,6 @@ int cdebug = PRINTD; static void yyerror(const char *err); -static void zconfprint(const char *err, ...); static void zconf_error(const char *err, ...); static bool zconf_endtoken(const char *tokenname, const char *expected_tokenname); @@ -183,7 +182,7 @@ menuconfig_stmt: menuconfig_entry_start config_option_list if (current_entry->prompt) current_entry->prompt->type = P_MENU; else - zconfprint("warning: menuconfig statement without prompt"); + zconf_error("menuconfig statement without prompt"); printd(DEBUG_PARSE, "%s:%d:endconfig\n", cur_filename, cur_lineno); }; @@ -402,14 +401,14 @@ help: help_start T_HELPTEXT { if (current_entry->help) { free(current_entry->help); - zconfprint("warning: '%s' defined with more than one help text -- only the last one will be used", - current_entry->sym->name ?: "<choice>"); + zconf_error("'%s' defined with more than one help text", + current_entry->sym->name ?: "<choice>"); } /* Is the help text empty or all whitespace? */ if ($2[strspn($2, " \f\n\r\t\v")] == '\0') - zconfprint("warning: '%s' defined with blank help text", - current_entry->sym->name ?: "<choice>"); + zconf_error("'%s' defined with blank help text", + current_entry->sym->name ?: "<choice>"); current_entry->help = $2; }; @@ -592,17 +591,6 @@ static bool zconf_endtoken(const char *tokenname, return true; } -static void zconfprint(const char *err, ...) -{ - va_list ap; - - fprintf(stderr, "%s:%d: ", cur_filename, cur_lineno); - va_start(ap, err); - vfprintf(stderr, err, ap); - va_end(ap); - fprintf(stderr, "\n"); -} - static void zconf_error(const char *err, ...) { va_list ap; |