kconfig: add 'static' to some file-local data
PATCH 1/1 kconfig: add 'static' to some file-local data
Fix some warnings from sparce like follows:
warning: symbol '...' was not declared. Should it be static?
Signed-off-by Masahiro Yamada <[email protected]>
---
scripts/kconfig/lexer.l | 2 +- scripts/kconfig/symbol.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-)
scripts/kconfig/lexer.l +1 -1
@@ -36,7 +36,7 @@ struct buffer { YY_BUFFER_STATE state; }; -struct buffer *current_buf; +static struct buffer *current_buf; static int last_ts, first_ts;
scripts/kconfig/symbol.c +10 -4
@@ -15,15 +15,21 @@ struct symbol symbol_yes = { .name = "y", .curr = { "y", yes }, .flags = SYMBOL_CONST|SYMBOL_VALID, -}, symbol_mod = { +}; + +struct symbol symbol_mod = { .name ="m" , .curr = {"m" , mod }, .flags =SYMBOL_CONST |SYMBOL_VALID , -}, symbol_no = { +}; + +struct symbol symbol_no = { .name ="n" , .curr = {"n" , no }, .flags =SYMBOL_CONST |SYMBOL_VALID , -}, symbol_empty = { +}; + +static struct symbol symbol_empty = { .name ="" , .curr = {"" , no }, .flags = SYMBOL_VALID,
@@ -31,7 +37,7 @@ struct symbol symbol_yes = {struct symbol *sym_defconfig_list;struct symbol *modules_sym; -tristate modules_val; +static tristate modules_val;enum symbol_type sym_get_type (struct symbol *sym) {
Signature · 1 line
2.25.1