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: remove zconfprint()

Turn all warnings during parsing into hard errors.

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

+5 -17
+5 -17
scripts/kconfig/parser.y
··· 24 24 int cdebug = PRINTD; 25 25 26 26 static void yyerror(const char *err); 27 - static void zconfprint(const char *err, ...); 28 27 static void zconf_error(const char *err, ...); 29 28 static bool zconf_endtoken(const char *tokenname, 30 29 const char *expected_tokenname); ··· 182 183 if (current_entry->prompt) 183 184 current_entry->prompt->type = P_MENU; 184 185 else 185 - zconfprint("warning: menuconfig statement without prompt"); 186 + zconf_error("menuconfig statement without prompt"); 186 187 printd(DEBUG_PARSE, "%s:%d:endconfig\n", cur_filename, cur_lineno); 187 188 }; 188 189 ··· 401 402 { 402 403 if (current_entry->help) { 403 404 free(current_entry->help); 404 - zconfprint("warning: '%s' defined with more than one help text -- only the last one will be used", 405 - current_entry->sym->name ?: "<choice>"); 405 + zconf_error("'%s' defined with more than one help text", 406 + current_entry->sym->name ?: "<choice>"); 406 407 } 407 408 408 409 /* Is the help text empty or all whitespace? */ 409 410 if ($2[strspn($2, " \f\n\r\t\v")] == '\0') 410 - zconfprint("warning: '%s' defined with blank help text", 411 - current_entry->sym->name ?: "<choice>"); 411 + zconf_error("'%s' defined with blank help text", 412 + current_entry->sym->name ?: "<choice>"); 412 413 413 414 current_entry->help = $2; 414 415 }; ··· 589 590 return false; 590 591 } 591 592 return true; 592 - } 593 - 594 - static void zconfprint(const char *err, ...) 595 - { 596 - va_list ap; 597 - 598 - fprintf(stderr, "%s:%d: ", cur_filename, cur_lineno); 599 - va_start(ap, err); 600 - vfprintf(stderr, err, ap); 601 - va_end(ap); 602 - fprintf(stderr, "\n"); 603 593 } 604 594 605 595 static void zconf_error(const char *err, ...)