diff options
author | Arnaud Lacombe <lacombar@gmail.com> | 2010-10-13 20:43:28 -0400 |
---|---|---|
committer | Arnaud Lacombe <lacombar@gmail.com> | 2011-07-02 01:04:38 -0400 |
commit | 275744cc8da0fd006e8f8fc1090f01dc0296810d (patch) | |
tree | 93a812aaa6c9d867719a8d00a960d88cc7db00fa /scripts | |
parent | 8494453ad50599b0c9d099a230e423a89222ad08 (diff) |
kconfig/conf: reduce the scope of `defconfig_file'
This variable is not used outside of main() so there is not much reason keeping
it global. Ensure it is initialized as gcc has no way to know that normal
execution path expect only one option switch to be given on the command line
(except when we request help). As a result, we always initialize
`defconfig_file' before using it.
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/conf.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 08c05bcc82c9..6431f5c004d9 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
@@ -34,8 +34,6 @@ enum input_mode { | |||
34 | oldnoconfig, | 34 | oldnoconfig, |
35 | } input_mode = oldaskconfig; | 35 | } input_mode = oldaskconfig; |
36 | 36 | ||
37 | char *defconfig_file; | ||
38 | |||
39 | static int indent = 1; | 37 | static int indent = 1; |
40 | static int valid_stdin = 1; | 38 | static int valid_stdin = 1; |
41 | static int sync_kconfig; | 39 | static int sync_kconfig; |
@@ -462,7 +460,7 @@ static struct option long_opts[] = { | |||
462 | int main(int ac, char **av) | 460 | int main(int ac, char **av) |
463 | { | 461 | { |
464 | int opt; | 462 | int opt; |
465 | const char *name; | 463 | const char *name, *defconfig_file = NULL /* gcc uninit */; |
466 | struct stat tmpstat; | 464 | struct stat tmpstat; |
467 | 465 | ||
468 | setlocale(LC_ALL, ""); | 466 | setlocale(LC_ALL, ""); |