From c2264564df3d70723c6d6eb96c18b99698c112fd Mon Sep 17 00:00:00 2001 From: Andreas Ruprecht Date: Sun, 12 Jul 2015 09:41:50 +0200 Subject: kconfig: warn of unhandled characters in Kconfig commands In Kconfig, definitions of options take the following form: " ...". COMMANDs and PARAMs are treated slightly different by the underlying parser. While commit 2e0d737fc76f ("kconfig: don't silently ignore unhandled characters") introduced a warning for unsupported characters around PARAMs, it does not cover situations where a COMMAND has additional characters before it. This change makes Kconfig emit a warning if superfluous characters are found before COMMANDs. As the 'help' statement sometimes is written as '---help---', the '-' character would now also be regarded as unhandled and generate a warning. To avoid that, '-' is added to the list of allowed characters, and the token '---help---' is included in the zconf.gperf file. Reported-by: Valentin Rothberg Signed-off-by: Andreas Ruprecht Reviewed-by: Ulf Magnusson Tested-by: Ulf Magnusson Signed-off-by: Michal Marek --- scripts/kconfig/zconf.gperf | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/kconfig/zconf.gperf') diff --git a/scripts/kconfig/zconf.gperf b/scripts/kconfig/zconf.gperf index b6ac02d604f1..ac498f01b449 100644 --- a/scripts/kconfig/zconf.gperf +++ b/scripts/kconfig/zconf.gperf @@ -22,6 +22,7 @@ comment, T_COMMENT, TF_COMMAND config, T_CONFIG, TF_COMMAND menuconfig, T_MENUCONFIG, TF_COMMAND help, T_HELP, TF_COMMAND +---help---, T_HELP, TF_COMMAND if, T_IF, TF_COMMAND|TF_PARAM endif, T_ENDIF, TF_COMMAND depends, T_DEPENDS, TF_COMMAND -- cgit v1.2.3-59-g8ed1b