projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d05377e
)
kconfig: narrow the scope of variables in the lexer
author
Masahiro Yamada
<masahiroy@kernel.org>
Mon, 27 Sep 2021 12:54:36 +0000
(21:54 +0900)
committer
Masahiro Yamada
<masahiroy@kernel.org>
Wed, 29 Sep 2021 17:05:10 +0000
(
02:05
+0900)
The variables, "ts" and "i", are used locally in the action of
the [ \t]+ pattern in the <HELP> start state.
Define them where they are used.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/lexer.l
patch
|
blob
|
history
diff --git
a/scripts/kconfig/lexer.l
b/scripts/kconfig/lexer.l
index 312cbad2d34d41c494b6441268950a1a968f7141..efe4878593083fbc0aa76ddf494dbb0ccc90b619 100644
(file)
--- 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_-]
<HELP>{
[ \t]+ {
+ int ts, i;
+
ts = 0;
for (i = 0; i < yyleng; i++) {
if (yytext[i] == '\t')