aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/basic/docproc.c18
-rw-r--r--scripts/basic/fixdep.c12
-rw-r--r--scripts/basic/split-include.c4
-rwxr-xr-xscripts/gcc-version.sh4
-rw-r--r--scripts/kconfig/conf.c6
-rw-r--r--scripts/kconfig/confdata.c2
-rw-r--r--scripts/kconfig/mconf.c2
7 files changed, 24 insertions, 24 deletions
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c
index bfc1a9844..2c7a19b83 100644
--- a/scripts/basic/docproc.c
+++ b/scripts/basic/docproc.c
@@ -197,10 +197,10 @@ void find_export_symbols(char * filename)
197 perror(real_filename); 197 perror(real_filename);
198 } 198 }
199 while (fgets(line, MAXLINESZ, fp)) { 199 while (fgets(line, MAXLINESZ, fp)) {
200 char *p; 200 unsigned char *p;
201 char *e; 201 unsigned char *e;
202 if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != 0) || 202 if (((p = (unsigned char *)strstr(line, "EXPORT_SYMBOL_GPL")) != 0) ||
203 ((p = strstr(line, "EXPORT_SYMBOL")) != 0)) { 203 ((p = (unsigned char *)strstr(line, "EXPORT_SYMBOL")) != 0)) {
204 /* Skip EXPORT_SYMBOL{_GPL} */ 204 /* Skip EXPORT_SYMBOL{_GPL} */
205 while (isalnum(*p) || *p == '_') 205 while (isalnum(*p) || *p == '_')
206 p++; 206 p++;
@@ -217,7 +217,7 @@ void find_export_symbols(char * filename)
217 while (isalnum(*e) || *e == '_') 217 while (isalnum(*e) || *e == '_')
218 e++; 218 e++;
219 *e = '\0'; 219 *e = '\0';
220 add_new_symbol(sym, p); 220 add_new_symbol(sym, (char*)p);
221 } 221 }
222 } 222 }
223 fclose(fp); 223 fclose(fp);
@@ -281,7 +281,7 @@ void singfunc(char * filename, char * line)
281 281
282 /* Split line up in individual parameters preceded by FUNCTION */ 282 /* Split line up in individual parameters preceded by FUNCTION */
283 for (i=0; line[i]; i++) { 283 for (i=0; line[i]; i++) {
284 if (isspace(line[i])) { 284 if (isspace((unsigned char) line[i])) {
285 line[i] = '\0'; 285 line[i] = '\0';
286 startofsym = 1; 286 startofsym = 1;
287 continue; 287 continue;
@@ -308,10 +308,10 @@ void singfunc(char * filename, char * line)
308void parse_file(FILE *infile) 308void parse_file(FILE *infile)
309{ 309{
310 char line[MAXLINESZ]; 310 char line[MAXLINESZ];
311 char * s; 311 unsigned char * s;
312 while (fgets(line, MAXLINESZ, infile)) { 312 while (fgets(line, MAXLINESZ, infile)) {
313 if (line[0] == '!') { 313 if (line[0] == '!') {
314 s = line + 2; 314 s = (unsigned char *)line + 2;
315 switch (line[1]) { 315 switch (line[1]) {
316 case 'E': 316 case 'E':
317 while (*s && !isspace(*s)) s++; 317 while (*s && !isspace(*s)) s++;
@@ -335,7 +335,7 @@ void parse_file(FILE *infile)
335 /* function names */ 335 /* function names */
336 while (isspace(*s)) 336 while (isspace(*s))
337 s++; 337 s++;
338 singlefunctions(line +2, s); 338 singlefunctions(line +2, (char*)s);
339 break; 339 break;
340 default: 340 default:
341 defaultline(line); 341 defaultline(line);
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 9f461a65b..64fd92f06 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -281,10 +281,10 @@ void use_config(char *m, int slen)
281void parse_config_file(char *map, size_t len) 281void parse_config_file(char *map, size_t len)
282{ 282{
283 /* modified for bbox */ 283 /* modified for bbox */
284 char *end_3 = map + len - 3; /* 3 == length of "IF_" */ 284 unsigned char *end_3 = (unsigned char *)map + len - 3; /* 3 == length of "IF_" */
285 char *end_7 = map + len - 7; 285 unsigned char *end_7 = (unsigned char *)map + len - 7;
286 char *p = map; 286 unsigned char *p = (unsigned char *)map;
287 char *q; 287 unsigned char *q;
288 int off; 288 int off;
289 289
290 for (; p <= end_3; p++) { 290 for (; p <= end_3; p++) {
@@ -318,7 +318,7 @@ void parse_config_file(char *map, size_t len)
318 break; 318 break;
319 } 319 }
320 if (q != p) { 320 if (q != p) {
321 use_config(p, q-p); 321 use_config((char*)p, q - p);
322 } 322 }
323 } 323 }
324} 324}
@@ -391,7 +391,7 @@ void parse_dep_file(void *map, size_t len)
391 while (p < end && *p != ' ') p++; 391 while (p < end && *p != ' ') p++;
392 if (p == m) break; 392 if (p == m) break;
393 if (p == end) { 393 if (p == end) {
394 do p--; while (p != m && !isalnum(*p)); 394 do p--; while (p != m && !isalnum((unsigned char)*p));
395 p++; 395 p++;
396 } 396 }
397 if (p == m) break; 397 if (p == m) break;
diff --git a/scripts/basic/split-include.c b/scripts/basic/split-include.c
index 9a9260f2c..290bea2fb 100644
--- a/scripts/basic/split-include.c
+++ b/scripts/basic/split-include.c
@@ -118,7 +118,7 @@ int main(int argc, const char * argv [])
118 /* We found #define CONFIG_foo or #undef CONFIG_foo. 118 /* We found #define CONFIG_foo or #undef CONFIG_foo.
119 * Make the output file name. */ 119 * Make the output file name. */
120 str_config += sizeof(" CONFIG_") - 1; 120 str_config += sizeof(" CONFIG_") - 1;
121 for (itarget = 0; !isspace(str_config[itarget]); itarget++) 121 for (itarget = 0; !isspace((unsigned char)str_config[itarget]); itarget++)
122 { 122 {
123 int c = (unsigned char) str_config[itarget]; 123 int c = (unsigned char) str_config[itarget];
124 if (isupper(c)) c = tolower(c); 124 if (isupper(c)) c = tolower(c);
@@ -133,7 +133,7 @@ int main(int argc, const char * argv [])
133 is_same = 0; 133 is_same = 0;
134 if ((fp_target = fopen(ptarget, "r")) != NULL) 134 if ((fp_target = fopen(ptarget, "r")) != NULL)
135 { 135 {
136 if (!fgets(old_line, buffer_size, fp_target)) 136 if (!fgets(old_line, buffer_size, fp_target) && ferror(fp_target))
137 ERROR_EXIT(ptarget); 137 ERROR_EXIT(ptarget);
138 if (fclose(fp_target) != 0) 138 if (fclose(fp_target) != 0)
139 ERROR_EXIT(ptarget); 139 ERROR_EXIT(ptarget);
diff --git a/scripts/gcc-version.sh b/scripts/gcc-version.sh
index 34510804f..0eb27c7a6 100755
--- a/scripts/gcc-version.sh
+++ b/scripts/gcc-version.sh
@@ -7,6 +7,6 @@
7# 7#
8 8
9compiler="$*" 9compiler="$*"
10 10# tr -d '\r': fix up msdos-style line endings (Cygwin et al)
11MAJ_MIN=$(echo __GNUC__ __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1) 11MAJ_MIN=$(echo __GNUC__ __GNUC_MINOR__ | $compiler -E -xc - | tr -d '\r' | tail -n 1)
12printf '%02d%02d\n' $MAJ_MIN 12printf '%02d%02d\n' $MAJ_MIN
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 80bd55a68..4680932d7 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -44,7 +44,7 @@ static void strip(char *str)
44 char *p = str; 44 char *p = str;
45 int l; 45 int l;
46 46
47 while ((isspace(*p))) 47 while ((isspace((unsigned char)*p)))
48 p++; 48 p++;
49 l = strlen(p); 49 l = strlen(p);
50 if (p != str) 50 if (p != str)
@@ -52,7 +52,7 @@ static void strip(char *str)
52 if (!l) 52 if (!l)
53 return; 53 return;
54 p = str + l - 1; 54 p = str + l - 1;
55 while ((isspace(*p))) 55 while ((isspace((unsigned char)*p)))
56 *p-- = 0; 56 *p-- = 0;
57} 57}
58 58
@@ -406,7 +406,7 @@ static int conf_choice(struct menu *menu)
406 } 406 }
407 if (!line[0]) 407 if (!line[0])
408 cnt = def; 408 cnt = def;
409 else if (isdigit(line[0])) 409 else if (isdigit((unsigned char)line[0]))
410 cnt = atoi(line); 410 cnt = atoi(line);
411 else 411 else
412 continue; 412 continue;
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index b92c2324e..d6c1621b8 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -54,7 +54,7 @@ static char *conf_expand_value(const char *in)
54 strncat(res_value, in, src - in); 54 strncat(res_value, in, src - in);
55 src++; 55 src++;
56 dst = name; 56 dst = name;
57 while (isalnum(*src) || *src == '_') 57 while (isalnum((unsigned char)*src) || *src == '_')
58 *dst++ = *src++; 58 *dst++ = *src++;
59 *dst = 0; 59 *dst = 0;
60 sym = sym_lookup(name, 0); 60 sym = sym_lookup(name, 0);
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index d945f2cd5..55afeb763 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -790,7 +790,7 @@ static void conf(struct menu *menu)
790 if (!type) 790 if (!type)
791 continue; 791 continue;
792 792
793 for (i = 0; input_buf[i] && !isspace(input_buf[i]); i++) 793 for (i = 0; input_buf[i] && !isspace((unsigned char)input_buf[i]); i++)
794 ; 794 ;
795 if (i >= sizeof(active_entry)) 795 if (i >= sizeof(active_entry))
796 i = sizeof(active_entry) - 1; 796 i = sizeof(active_entry) - 1;