diff options
| author | Ron Yorston <rmy@pobox.com> | 2021-05-14 08:17:12 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2021-05-14 08:17:12 +0100 |
| commit | a3f5a1b7f4275f713acf22f534f95c0da8392e53 (patch) | |
| tree | 49b65422a3e9c33f508da9ccf3ae79d324bd9e96 /scripts/basic | |
| parent | 375cda9a88024135d630ca8990d9aff4ea414e89 (diff) | |
| parent | 7de0ab21d939a5a304157f75918d0318a95261a3 (diff) | |
| download | busybox-w32-a3f5a1b7f4275f713acf22f534f95c0da8392e53.tar.gz busybox-w32-a3f5a1b7f4275f713acf22f534f95c0da8392e53.tar.bz2 busybox-w32-a3f5a1b7f4275f713acf22f534f95c0da8392e53.zip | |
Merge branch 'busybox' into merge
Diffstat (limited to 'scripts/basic')
| -rw-r--r-- | scripts/basic/docproc.c | 18 | ||||
| -rw-r--r-- | scripts/basic/fixdep.c | 12 | ||||
| -rw-r--r-- | scripts/basic/split-include.c | 4 |
3 files changed, 17 insertions, 17 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) | |||
| 308 | void parse_file(FILE *infile) | 308 | void 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) | |||
| 281 | void parse_config_file(char *map, size_t len) | 281 | void 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); |
