diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-04-14 19:12:43 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-04-14 19:12:43 +0200 |
| commit | 1a45b2ccea94b0fc123798f276a0801413597880 (patch) | |
| tree | 3368e80011c915cc19d3a83463fd9c0f7c9c6180 /scripts/basic/docproc.c | |
| parent | eb1b2902b8b7b7effdba711645288c64884fd3e7 (diff) | |
| download | busybox-w32-1a45b2ccea94b0fc123798f276a0801413597880.tar.gz busybox-w32-1a45b2ccea94b0fc123798f276a0801413597880.tar.bz2 busybox-w32-1a45b2ccea94b0fc123798f276a0801413597880.zip | |
fix "warning array subscript has type 'char'"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts/basic/docproc.c')
| -rw-r--r-- | scripts/basic/docproc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c index 720098a23..4464e1874 100644 --- a/scripts/basic/docproc.c +++ b/scripts/basic/docproc.c | |||
| @@ -182,10 +182,10 @@ void find_export_symbols(char * filename) | |||
| 182 | perror(real_filename); | 182 | perror(real_filename); |
| 183 | } | 183 | } |
| 184 | while (fgets(line, MAXLINESZ, fp)) { | 184 | while (fgets(line, MAXLINESZ, fp)) { |
| 185 | char *p; | 185 | unsigned char *p; |
| 186 | char *e; | 186 | unsigned char *e; |
| 187 | if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != 0) || | 187 | if (((p = (unsigned char *)strstr(line, "EXPORT_SYMBOL_GPL")) != 0) || |
| 188 | ((p = strstr(line, "EXPORT_SYMBOL")) != 0)) { | 188 | ((p = (unsigned char *)strstr(line, "EXPORT_SYMBOL")) != 0)) { |
| 189 | /* Skip EXPORT_SYMBOL{_GPL} */ | 189 | /* Skip EXPORT_SYMBOL{_GPL} */ |
| 190 | while (isalnum(*p) || *p == '_') | 190 | while (isalnum(*p) || *p == '_') |
| 191 | p++; | 191 | p++; |
| @@ -202,7 +202,7 @@ void find_export_symbols(char * filename) | |||
| 202 | while (isalnum(*e) || *e == '_') | 202 | while (isalnum(*e) || *e == '_') |
| 203 | e++; | 203 | e++; |
| 204 | *e = '\0'; | 204 | *e = '\0'; |
| 205 | add_new_symbol(sym, p); | 205 | add_new_symbol(sym, (char*)p); |
| 206 | } | 206 | } |
| 207 | } | 207 | } |
| 208 | fclose(fp); | 208 | fclose(fp); |
| @@ -266,7 +266,7 @@ void singfunc(char * filename, char * line) | |||
| 266 | 266 | ||
| 267 | /* Split line up in individual parameters preceded by FUNCTION */ | 267 | /* Split line up in individual parameters preceded by FUNCTION */ |
| 268 | for (i=0; line[i]; i++) { | 268 | for (i=0; line[i]; i++) { |
| 269 | if (isspace(line[i])) { | 269 | if (isspace((unsigned char) line[i])) { |
| 270 | line[i] = '\0'; | 270 | line[i] = '\0'; |
| 271 | startofsym = 1; | 271 | startofsym = 1; |
| 272 | continue; | 272 | continue; |
| @@ -293,10 +293,10 @@ void singfunc(char * filename, char * line) | |||
| 293 | void parse_file(FILE *infile) | 293 | void parse_file(FILE *infile) |
| 294 | { | 294 | { |
| 295 | char line[MAXLINESZ]; | 295 | char line[MAXLINESZ]; |
| 296 | char * s; | 296 | unsigned char * s; |
| 297 | while (fgets(line, MAXLINESZ, infile)) { | 297 | while (fgets(line, MAXLINESZ, infile)) { |
| 298 | if (line[0] == '!') { | 298 | if (line[0] == '!') { |
| 299 | s = line + 2; | 299 | s = (unsigned char *)line + 2; |
| 300 | switch (line[1]) { | 300 | switch (line[1]) { |
| 301 | case 'E': | 301 | case 'E': |
| 302 | while (*s && !isspace(*s)) s++; | 302 | while (*s && !isspace(*s)) s++; |
| @@ -320,7 +320,7 @@ void parse_file(FILE *infile) | |||
| 320 | /* function names */ | 320 | /* function names */ |
| 321 | while (isspace(*s)) | 321 | while (isspace(*s)) |
| 322 | s++; | 322 | s++; |
| 323 | singlefunctions(line +2, s); | 323 | singlefunctions(line +2, (char*)s); |
| 324 | break; | 324 | break; |
| 325 | default: | 325 | default: |
| 326 | defaultline(line); | 326 | defaultline(line); |
