From: Masahiro Yamada Date: Mon, 27 Sep 2021 12:54:36 +0000 (+0900) Subject: kconfig: narrow the scope of variables in the lexer X-Git-Tag: v5.16-rc1~94^2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=65017d8381e2425a1b4cdc4681fadc179635c000;p=thirdparty%2Fkernel%2Flinux.git kconfig: narrow the scope of variables in the lexer The variables, "ts" and "i", are used locally in the action of the [ \t]+ pattern in the start state. Define them where they are used. Signed-off-by: Masahiro Yamada --- diff --git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l index 312cbad2d34d4..efe4878593083 100644 --- a/scripts/kconfig/lexer.l +++ b/scripts/kconfig/lexer.l @@ -85,7 +85,6 @@ n [A-Za-z0-9_-] %% int str = 0; - int ts, i; #.* /* ignore comment */ [ \t]* /* whitespaces */ @@ -196,6 +195,8 @@ n [A-Za-z0-9_-] { [ \t]+ { + int ts, i; + ts = 0; for (i = 0; i < yyleng; i++) { if (yytext[i] == '\t')