kconfig: add 'static' to some file-local data
authorMasahiro Yamada <masahiroy@kernel.org>
Wed, 29 Jul 2020 03:18:37 +0000 (12:18 +0900)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 5 Feb 2021 11:04:09 +0000 (12:04 +0100)
Fix some warnings from sparce like follows:

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

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/lexer.l
config/symbol.c

index 76ab3db3c8977bf3cfa9bbc27014c30096e34bc0..8b0fd8f121139968a5562263ec89affcf044f18c 100644 (file)
@@ -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;
 
index 9363e37b88709b563fae7a422c011a31264ccb94..ffa3ec65cc907ac1f72a66755ae39aabc09d6e6c 100644 (file)
@@ -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)
 {