diff options
| author | Tom Rini <trini@kernel.crashing.org> | 2004-10-27 04:27:31 +0200 |
|---|---|---|
| committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2004-10-27 04:27:31 +0200 |
| commit | 50dc57c4c7b19fe600c68881b5279b7630b75141 (patch) | |
| tree | ebf6fafc6ff3f425ffe06cd456c432ab3a4e033b /scripts/basic | |
| parent | 298039e7b2dc1bd12cb2944707ede23c8af770c4 (diff) | |
kbuild: warning fixes on Solaris 9
The following set of patches is based loosely on the patches that
Jean-Christophe Dubois came up with for 2.6.7. Where as the original
patches added a number of casts to unsigned char, I went the route of
making the chars be explicitly signed. I honestly don't know which
route is better to go down. Doing this is the bulk of the patch. Out
of the rest of the odds 'n ends is that on Solaris, Elf32_Word is a
ulong, which means all of the printf's are unhappy (uint format, ulong
arg) for most of the typedefs.
Signed-off-by: Tom Rini <trini@kernel.crashing.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/basic')
| -rw-r--r-- | scripts/basic/docproc.c | 14 | ||||
| -rw-r--r-- | scripts/basic/fixdep.c | 10 | ||||
| -rw-r--r-- | scripts/basic/split-include.c | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c index cb02baa63256..8ca7ecdb68fb 100644 --- a/scripts/basic/docproc.c +++ b/scripts/basic/docproc.c @@ -52,7 +52,7 @@ FILEONLY *internalfunctions; FILEONLY *externalfunctions; FILEONLY *symbolsonly; -typedef void FILELINE(char * file, char * line); +typedef void FILELINE(char * file, signed char * line); FILELINE * singlefunctions; FILELINE * entity_system; @@ -148,9 +148,9 @@ struct symfile * filename_exist(char * filename) * Files are separated by tabs. */ void adddep(char * file) { printf("\t%s", file); } -void adddep2(char * file, char * line) { line = line; adddep(file); } +void adddep2(char * file, signed char * line) { line = line; adddep(file); } void noaction(char * line) { line = line; } -void noaction2(char * file, char * line) { file = file; line = line; } +void noaction2(char * file, signed char * line) { file = file; line = line; } /* Echo the line without further action */ void printline(char * line) { printf("%s", line); } @@ -179,8 +179,8 @@ void find_export_symbols(char * filename) perror(real_filename); } while(fgets(line, MAXLINESZ, fp)) { - char *p; - char *e; + signed char *p; + signed char *e; if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != 0) || ((p = strstr(line, "EXPORT_SYMBOL")) != 0)) { /* Skip EXPORT_SYMBOL{_GPL} */ @@ -253,7 +253,7 @@ void extfunc(char * filename) { docfunctions(filename, FUNCTION); } * Call kernel-doc with the following parameters: * kernel-doc -docbook -function function1 [-function function2] */ -void singfunc(char * filename, char * line) +void singfunc(char * filename, signed char * line) { char *vec[200]; /* Enough for specific functions */ int i, idx = 0; @@ -290,7 +290,7 @@ void singfunc(char * filename, char * line) void parse_file(FILE *infile) { char line[MAXLINESZ]; - char * s; + signed char * s; while(fgets(line, MAXLINESZ, infile)) { if (line[0] == '!') { s = line + 2; diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 8c4c703958cd..56e4a3d9a8a7 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -217,12 +217,12 @@ void use_config(char *m, int slen) printf(" $(wildcard include/config/%s.h) \\\n", s); } -void parse_config_file(char *map, size_t len) +void parse_config_file(signed char *map, size_t len) { int *end = (int *) (map + len); /* start at +1, so that p can never be < map */ int *m = (int *) map + 1; - char *p, *q; + signed char *p, *q; for (; m < end; m++) { if (*m == INT_CONF) { p = (char *) m ; goto conf; } @@ -291,9 +291,9 @@ void do_config_file(char *filename) void parse_dep_file(void *map, size_t len) { - char *m = map; - char *end = m + len; - char *p; + signed char *m = map; + signed char *end = m + len; + signed char *p; char s[PATH_MAX]; p = strchr(m, ':'); diff --git a/scripts/basic/split-include.c b/scripts/basic/split-include.c index 459c45276cb1..60fc4d8ebaa9 100644 --- a/scripts/basic/split-include.c +++ b/scripts/basic/split-include.c @@ -104,7 +104,7 @@ int main(int argc, const char * argv []) /* Read config lines. */ while (fgets(line, buffer_size, fp_config)) { - const char * str_config; + const signed char * str_config; int is_same; int itarget; |
