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/fixdep.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/fixdep.c')
-rw-r--r-- | scripts/basic/fixdep.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 19f82df09..426b4888b 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c | |||
@@ -226,10 +226,10 @@ void use_config(char *m, int slen) | |||
226 | void parse_config_file(char *map, size_t len) | 226 | void parse_config_file(char *map, size_t len) |
227 | { | 227 | { |
228 | /* modified for bbox */ | 228 | /* modified for bbox */ |
229 | char *end_3 = map + len - 3; /* 3 == length of "IF_" */ | 229 | unsigned char *end_3 = (unsigned char *)map + len - 3; /* 3 == length of "IF_" */ |
230 | char *end_7 = map + len - 7; | 230 | unsigned char *end_7 = (unsigned char *)map + len - 7; |
231 | char *p = map; | 231 | unsigned char *p = (unsigned char *)map; |
232 | char *q; | 232 | unsigned char *q; |
233 | int off; | 233 | int off; |
234 | 234 | ||
235 | for (; p <= end_3; p++) { | 235 | for (; p <= end_3; p++) { |
@@ -263,7 +263,7 @@ void parse_config_file(char *map, size_t len) | |||
263 | break; | 263 | break; |
264 | } | 264 | } |
265 | if (q != p) { | 265 | if (q != p) { |
266 | use_config(p, q-p); | 266 | use_config((char*)p, q - p); |
267 | } | 267 | } |
268 | } | 268 | } |
269 | } | 269 | } |
@@ -335,7 +335,7 @@ void parse_dep_file(void *map, size_t len) | |||
335 | p = m; | 335 | p = m; |
336 | while (p < end && *p != ' ') p++; | 336 | while (p < end && *p != ' ') p++; |
337 | if (p == end) { | 337 | if (p == end) { |
338 | do p--; while (!isalnum(*p)); | 338 | do p--; while (!isalnum((unsigned char)*p)); |
339 | p++; | 339 | p++; |
340 | } | 340 | } |
341 | memcpy(s, m, p-m); s[p-m] = 0; | 341 | memcpy(s, m, p-m); s[p-m] = 0; |