Skip to content

Commit d41809f

Browse files
committed
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 <masahiroy@kernel.org>
1 parent 7eb7c10 commit d41809f

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

‎scripts/kconfig/lexer.l‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct buffer {
3636
YY_BUFFER_STATE state;
3737
};
3838

39-
struct buffer *current_buf;
39+
static struct buffer *current_buf;
4040

4141
static int last_ts, first_ts;
4242

‎scripts/kconfig/symbol.c‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,29 @@ struct symbol symbol_yes = {
1515
.name = "y",
1616
.curr = { "y", yes },
1717
.flags = SYMBOL_CONST|SYMBOL_VALID,
18-
}, symbol_mod = {
18+
};
19+
20+
struct symbol symbol_mod = {
1921
.name = "m",
2022
.curr = { "m", mod },
2123
.flags = SYMBOL_CONST|SYMBOL_VALID,
22-
}, symbol_no = {
24+
};
25+
26+
struct symbol symbol_no = {
2327
.name = "n",
2428
.curr = { "n", no },
2529
.flags = SYMBOL_CONST|SYMBOL_VALID,
26-
}, symbol_empty = {
30+
};
31+
32+
static struct symbol symbol_empty = {
2733
.name = "",
2834
.curr = { "", no },
2935
.flags = SYMBOL_VALID,
3036
};
3137

3238
struct symbol *sym_defconfig_list;
3339
struct symbol *modules_sym;
34-
tristate modules_val;
40+
static tristate modules_val;
3541

3642
enum symbol_type sym_get_type(struct symbol *sym)
3743
{

0 commit comments

Comments
 (0)