diff options
author | Trevor Keith <tsrk@tsrk.net> | 2009-09-18 15:49:23 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2009-09-20 06:27:44 -0400 |
commit | 4356f4890792a678936c93c9196e8f7742e04535 (patch) | |
tree | 6c64cbb77de98dfc45e4330632e6f8b27f50ef04 /scripts/basic/fixdep.c | |
parent | 66a570623be0d96130470a41cd38bce889b7e885 (diff) |
kbuild: add static to prototypes
Warnings found via gcc -Wmissing-prototypes.
Signed-off-by: Trevor Keith <tsrk@tsrk.net>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/basic/fixdep.c')
-rw-r--r-- | scripts/basic/fixdep.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 72c15205bb2b..d7c1b04791f7 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c | |||
@@ -125,7 +125,7 @@ char *target; | |||
125 | char *depfile; | 125 | char *depfile; |
126 | char *cmdline; | 126 | char *cmdline; |
127 | 127 | ||
128 | void usage(void) | 128 | static void usage(void) |
129 | 129 | ||
130 | { | 130 | { |
131 | fprintf(stderr, "Usage: fixdep <depfile> <target> <cmdline>\n"); | 131 | fprintf(stderr, "Usage: fixdep <depfile> <target> <cmdline>\n"); |
@@ -135,7 +135,7 @@ void usage(void) | |||
135 | /* | 135 | /* |
136 | * Print out the commandline prefixed with cmd_<target filename> := | 136 | * Print out the commandline prefixed with cmd_<target filename> := |
137 | */ | 137 | */ |
138 | void print_cmdline(void) | 138 | static void print_cmdline(void) |
139 | { | 139 | { |
140 | printf("cmd_%s := %s\n\n", target, cmdline); | 140 | printf("cmd_%s := %s\n\n", target, cmdline); |
141 | } | 141 | } |
@@ -148,7 +148,7 @@ int len_config = 0; | |||
148 | * Grow the configuration string to a desired length. | 148 | * Grow the configuration string to a desired length. |
149 | * Usually the first growth is plenty. | 149 | * Usually the first growth is plenty. |
150 | */ | 150 | */ |
151 | void grow_config(int len) | 151 | static void grow_config(int len) |
152 | { | 152 | { |
153 | while (len_config + len > size_config) { | 153 | while (len_config + len > size_config) { |
154 | if (size_config == 0) | 154 | if (size_config == 0) |
@@ -164,7 +164,7 @@ void grow_config(int len) | |||
164 | /* | 164 | /* |
165 | * Lookup a value in the configuration string. | 165 | * Lookup a value in the configuration string. |
166 | */ | 166 | */ |
167 | int is_defined_config(const char * name, int len) | 167 | static int is_defined_config(const char * name, int len) |
168 | { | 168 | { |
169 | const char * pconfig; | 169 | const char * pconfig; |
170 | const char * plast = str_config + len_config - len; | 170 | const char * plast = str_config + len_config - len; |
@@ -180,7 +180,7 @@ int is_defined_config(const char * name, int len) | |||
180 | /* | 180 | /* |
181 | * Add a new value to the configuration string. | 181 | * Add a new value to the configuration string. |
182 | */ | 182 | */ |
183 | void define_config(const char * name, int len) | 183 | static void define_config(const char * name, int len) |
184 | { | 184 | { |
185 | grow_config(len + 1); | 185 | grow_config(len + 1); |
186 | 186 | ||
@@ -192,7 +192,7 @@ void define_config(const char * name, int len) | |||
192 | /* | 192 | /* |
193 | * Clear the set of configuration strings. | 193 | * Clear the set of configuration strings. |
194 | */ | 194 | */ |
195 | void clear_config(void) | 195 | static void clear_config(void) |
196 | { | 196 | { |
197 | len_config = 0; | 197 | len_config = 0; |
198 | define_config("", 0); | 198 | define_config("", 0); |
@@ -201,7 +201,7 @@ void clear_config(void) | |||
201 | /* | 201 | /* |
202 | * Record the use of a CONFIG_* word. | 202 | * Record the use of a CONFIG_* word. |
203 | */ | 203 | */ |
204 | void use_config(char *m, int slen) | 204 | static void use_config(char *m, int slen) |
205 | { | 205 | { |
206 | char s[PATH_MAX]; | 206 | char s[PATH_MAX]; |
207 | char *p; | 207 | char *p; |
@@ -222,7 +222,7 @@ void use_config(char *m, int slen) | |||
222 | printf(" $(wildcard include/config/%s.h) \\\n", s); | 222 | printf(" $(wildcard include/config/%s.h) \\\n", s); |
223 | } | 223 | } |
224 | 224 | ||
225 | void parse_config_file(char *map, size_t len) | 225 | static void parse_config_file(char *map, size_t len) |
226 | { | 226 | { |
227 | int *end = (int *) (map + len); | 227 | int *end = (int *) (map + len); |
228 | /* start at +1, so that p can never be < map */ | 228 | /* start at +1, so that p can never be < map */ |
@@ -256,7 +256,7 @@ void parse_config_file(char *map, size_t len) | |||
256 | } | 256 | } |
257 | 257 | ||
258 | /* test is s ends in sub */ | 258 | /* test is s ends in sub */ |
259 | int strrcmp(char *s, char *sub) | 259 | static int strrcmp(char *s, char *sub) |
260 | { | 260 | { |
261 | int slen = strlen(s); | 261 | int slen = strlen(s); |
262 | int sublen = strlen(sub); | 262 | int sublen = strlen(sub); |
@@ -267,7 +267,7 @@ int strrcmp(char *s, char *sub) | |||
267 | return memcmp(s + slen - sublen, sub, sublen); | 267 | return memcmp(s + slen - sublen, sub, sublen); |
268 | } | 268 | } |
269 | 269 | ||
270 | void do_config_file(char *filename) | 270 | static void do_config_file(char *filename) |
271 | { | 271 | { |
272 | struct stat st; | 272 | struct stat st; |
273 | int fd; | 273 | int fd; |
@@ -298,7 +298,7 @@ void do_config_file(char *filename) | |||
298 | close(fd); | 298 | close(fd); |
299 | } | 299 | } |
300 | 300 | ||
301 | void parse_dep_file(void *map, size_t len) | 301 | static void parse_dep_file(void *map, size_t len) |
302 | { | 302 | { |
303 | char *m = map; | 303 | char *m = map; |
304 | char *end = m + len; | 304 | char *end = m + len; |
@@ -338,7 +338,7 @@ void parse_dep_file(void *map, size_t len) | |||
338 | printf("$(deps_%s):\n", target); | 338 | printf("$(deps_%s):\n", target); |
339 | } | 339 | } |
340 | 340 | ||
341 | void print_deps(void) | 341 | static void print_deps(void) |
342 | { | 342 | { |
343 | struct stat st; | 343 | struct stat st; |
344 | int fd; | 344 | int fd; |
@@ -370,7 +370,7 @@ void print_deps(void) | |||
370 | close(fd); | 370 | close(fd); |
371 | } | 371 | } |
372 | 372 | ||
373 | void traps(void) | 373 | static void traps(void) |
374 | { | 374 | { |
375 | static char test[] __attribute__((aligned(sizeof(int)))) = "CONF"; | 375 | static char test[] __attribute__((aligned(sizeof(int)))) = "CONF"; |
376 | int *p = (int *)test; | 376 | int *p = (int *)test; |