Skip to content

Commit

Permalink
kconfig: add 'static' to some file-local data
Browse files Browse the repository at this point in the history
Fix some warnings from sparce like follows:

  warning: symbol '...' was not declared. Should it be static?

Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
masahir0y committed Aug 14, 2020
1 parent 7eb7c10 commit d41809f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/kconfig/lexer.l
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
14 changes: 10 additions & 4 deletions scripts/kconfig/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,29 @@ 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,
};

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)
{
Expand Down

0 comments on commit d41809f

Please sign in to comment.