aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaximilian attems <max@stro.at>2011-09-07 12:26:19 +0200
committermaximilian attems <max@stro.at>2011-12-04 14:37:22 +0100
commit731d82caecbc309eea5e719ca0c6dfb03afd34c3 (patch)
tree5df82234c6c69cffc4a51502fa7aa3f25a24e40f
parent80b4ed3a639ffce0a7ea0bfeee524ccedb9cc348 (diff)
downloadklibc-731d82caecbc309eea5e719ca0c6dfb03afd34c3.tar.gz
[klibc] 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> [ ported 4356f4890792a678936c93c9196e8f7742e04535 to klibc + minor whitespaces ] Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r--scripts/basic/fixdep.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 5b6898028f410..fed4c7f13f650 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -123,14 +123,13 @@ char *target;
char *depfile;
char *cmdline;
-void usage(void)
-
+static void usage(void)
{
fprintf(stderr, "Usage: fixdep <depfile> <target> <cmdline>\n");
exit(1);
}
-void print_cmdline(void)
+static void print_cmdline(void)
{
printf("cmd_%s := %s\n\n", target, cmdline);
}
@@ -143,7 +142,7 @@ int len_config = 0;
* Grow the configuration string to a desired length.
* Usually the first growth is plenty.
*/
-void grow_config(int len)
+static void grow_config(int len)
{
while (len_config + len > size_config) {
if (size_config == 0)
@@ -159,7 +158,7 @@ void grow_config(int len)
/*
* Lookup a value in the configuration string.
*/
-int is_defined_config(const char * name, int len)
+static int is_defined_config(const char *name, int len)
{
const char * pconfig;
const char * plast = str_config + len_config - len;
@@ -175,7 +174,7 @@ int is_defined_config(const char * name, int len)
/*
* Add a new value to the configuration string.
*/
-void define_config(const char * name, int len)
+static void define_config(const char *name, int len)
{
grow_config(len + 1);
@@ -187,7 +186,7 @@ void define_config(const char * name, int len)
/*
* Clear the set of configuration strings.
*/
-void clear_config(void)
+static void clear_config(void)
{
len_config = 0;
define_config("", 0);
@@ -196,7 +195,7 @@ void clear_config(void)
/*
* Record the use of a CONFIG_* word.
*/
-void use_config(char *m, int slen)
+static void use_config(char *m, int slen)
{
char s[PATH_MAX];
char *p;
@@ -217,7 +216,7 @@ void use_config(char *m, int slen)
printf(" $(wildcard include/config/%s.h) \\\n", s);
}
-void parse_config_file(char *map, size_t len)
+static void parse_config_file(char *map, size_t len)
{
int *end = (int *) (map + len);
/* start at +1, so that p can never be < map */
@@ -247,7 +246,7 @@ void parse_config_file(char *map, size_t len)
}
/* test is s ends in sub */
-int strrcmp(char *s, char *sub)
+static int strrcmp(char *s, char *sub)
{
int slen = strlen(s);
int sublen = strlen(sub);
@@ -258,7 +257,7 @@ int strrcmp(char *s, char *sub)
return memcmp(s + slen - sublen, sub, sublen);
}
-void do_config_file(char *filename)
+static void do_config_file(char *filename)
{
struct stat st;
int fd;
@@ -289,7 +288,7 @@ void do_config_file(char *filename)
close(fd);
}
-void parse_dep_file(void *map, size_t len)
+static void parse_dep_file(void *map, size_t len)
{
char *m = map;
char *end = m + len;
@@ -329,7 +328,7 @@ void parse_dep_file(void *map, size_t len)
printf("$(deps_%s):\n", target);
}
-void print_deps(void)
+static void print_deps(void)
{
struct stat st;
int fd;
@@ -361,7 +360,7 @@ void print_deps(void)
close(fd);
}
-void traps(void)
+static void traps(void)
{
static char test[] __attribute__((aligned(sizeof(int)))) = "CONF";
int *p = (int *)test;