diff options
| -rw-r--r-- | coreutils/od_bloaty.c | 7 | ||||
| -rw-r--r-- | coreutils/printf.c | 2 | ||||
| -rw-r--r-- | editors/awk.c | 2 | ||||
| -rw-r--r-- | klibc-utils/resume.c | 2 | ||||
| -rw-r--r-- | libbb/get_last_path_component.c | 4 | ||||
| -rw-r--r-- | libbb/replace.c | 3 | ||||
| -rw-r--r-- | libbb/strrstr.c | 4 | ||||
| -rw-r--r-- | libbb/xfuncs_printf.c | 2 | ||||
| -rw-r--r-- | libpwdgrp/uidgid_get.c | 3 | ||||
| -rw-r--r-- | miscutils/bc.c | 2 | ||||
| -rw-r--r-- | networking/httpd.c | 2 | ||||
| -rw-r--r-- | networking/ifconfig.c | 2 | ||||
| -rw-r--r-- | networking/ifupdown.c | 2 | ||||
| -rw-r--r-- | networking/nbd-client.c | 2 | ||||
| -rw-r--r-- | networking/route.c | 36 | ||||
| -rw-r--r-- | networking/udhcp/d6_socket.c | 3 | ||||
| -rw-r--r-- | networking/udhcp/socket.c | 3 | ||||
| -rw-r--r-- | printutils/lpr.c | 2 | ||||
| -rw-r--r-- | procps/nmeter.c | 5 | ||||
| -rw-r--r-- | procps/powertop.c | 5 | ||||
| -rw-r--r-- | scripts/kconfig/confdata.c | 2 | ||||
| -rw-r--r-- | shell/ash.c | 14 |
22 files changed, 58 insertions, 51 deletions
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c index e886a4ed2..c0e6681f2 100644 --- a/coreutils/od_bloaty.c +++ b/coreutils/od_bloaty.c | |||
| @@ -1155,7 +1155,7 @@ dump_strings(off_t address, off_t end_offset) | |||
| 1155 | leading '+' return nonzero and set *OFFSET to the offset it denotes. */ | 1155 | leading '+' return nonzero and set *OFFSET to the offset it denotes. */ |
| 1156 | 1156 | ||
| 1157 | static int | 1157 | static int |
| 1158 | parse_old_offset(const char *s, off_t *offset) | 1158 | parse_old_offset(char *s, off_t *offset) |
| 1159 | { | 1159 | { |
| 1160 | static const struct suffix_mult Bb[] ALIGN_SUFFIX = { | 1160 | static const struct suffix_mult Bb[] ALIGN_SUFFIX = { |
| 1161 | { "B", 1024 }, | 1161 | { "B", 1024 }, |
| @@ -1181,7 +1181,8 @@ parse_old_offset(const char *s, off_t *offset) | |||
| 1181 | radix = 16; | 1181 | radix = 16; |
| 1182 | 1182 | ||
| 1183 | *offset = xstrtooff_sfx(s, radix, Bb); | 1183 | *offset = xstrtooff_sfx(s, radix, Bb); |
| 1184 | if (p) p[0] = '.'; | 1184 | if (p) |
| 1185 | p[0] = '.'; /* undo cheating */ | ||
| 1185 | 1186 | ||
| 1186 | return (*offset >= 0); | 1187 | return (*offset >= 0); |
| 1187 | } | 1188 | } |
| @@ -1234,7 +1235,7 @@ int od_main(int argc UNUSED_PARAM, char **argv) | |||
| 1234 | static const uint8_t doxn_address_pad_len_char[] ALIGN1 = { | 1235 | static const uint8_t doxn_address_pad_len_char[] ALIGN1 = { |
| 1235 | '7', '7', '6', /* '?' */ | 1236 | '7', '7', '6', /* '?' */ |
| 1236 | }; | 1237 | }; |
| 1237 | char *p; | 1238 | const char *p; |
| 1238 | int pos; | 1239 | int pos; |
| 1239 | p = strchr(doxn, str_A[0]); | 1240 | p = strchr(doxn, str_A[0]); |
| 1240 | if (!p) | 1241 | if (!p) |
diff --git a/coreutils/printf.c b/coreutils/printf.c index 4edcfa9b5..3cd48cfcc 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c | |||
| @@ -354,7 +354,7 @@ static char **print_formatted(char *f, char **argv, int *conv_err) | |||
| 354 | /* Add "ll" if integer modifier, then print */ | 354 | /* Add "ll" if integer modifier, then print */ |
| 355 | { | 355 | { |
| 356 | static const char format_chars[] ALIGN1 = "diouxXfeEgGcs"; | 356 | static const char format_chars[] ALIGN1 = "diouxXfeEgGcs"; |
| 357 | char *p = strchr(format_chars, *f); | 357 | char *p = (char*)strchr(format_chars, *f); |
| 358 | /* needed - try "printf %" without it */ | 358 | /* needed - try "printf %" without it */ |
| 359 | if (p == NULL || *f == '\0') { | 359 | if (p == NULL || *f == '\0') { |
| 360 | bb_error_msg("%s: invalid format", direc_start); | 360 | bb_error_msg("%s: invalid format", direc_start); |
diff --git a/editors/awk.c b/editors/awk.c index beba487fb..dd8f4ac42 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
| @@ -2841,7 +2841,7 @@ static NOINLINE var *exec_builtin(node *op, var *res) | |||
| 2841 | l = strlen(as[0]) - ll; | 2841 | l = strlen(as[0]) - ll; |
| 2842 | if (ll > 0 && l >= 0) { | 2842 | if (ll > 0 && l >= 0) { |
| 2843 | if (!icase) { | 2843 | if (!icase) { |
| 2844 | char *s = strstr(as[0], as[1]); | 2844 | const char *s = strstr(as[0], as[1]); |
| 2845 | if (s) | 2845 | if (s) |
| 2846 | n = (s - as[0]) + 1; | 2846 | n = (s - as[0]) + 1; |
| 2847 | } else { | 2847 | } else { |
diff --git a/klibc-utils/resume.c b/klibc-utils/resume.c index 179413627..cb8314c75 100644 --- a/klibc-utils/resume.c +++ b/klibc-utils/resume.c | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | * - /dev/ram (alias to /dev/ram0) | 31 | * - /dev/ram (alias to /dev/ram0) |
| 32 | * - /dev/mtd | 32 | * - /dev/mtd |
| 33 | */ | 33 | */ |
| 34 | static dev_t name_to_dev_t(const char *devname) | 34 | static dev_t name_to_dev_t(char *devname) |
| 35 | { | 35 | { |
| 36 | char devfile[sizeof(int)*3 * 2 + 4]; | 36 | char devfile[sizeof(int)*3 * 2 + 4]; |
| 37 | char *sysname; | 37 | char *sysname; |
diff --git a/libbb/get_last_path_component.c b/libbb/get_last_path_component.c index 04fdf2a3e..f9d56ad23 100644 --- a/libbb/get_last_path_component.c +++ b/libbb/get_last_path_component.c | |||
| @@ -24,12 +24,12 @@ const char* FAST_FUNC bb_basename(const char *name) | |||
| 24 | */ | 24 | */ |
| 25 | char* FAST_FUNC bb_get_last_path_component_nostrip(const char *path) | 25 | char* FAST_FUNC bb_get_last_path_component_nostrip(const char *path) |
| 26 | { | 26 | { |
| 27 | char *slash = strrchr(path, '/'); | 27 | const char *slash = strrchr(path, '/'); |
| 28 | 28 | ||
| 29 | if (!slash || (slash == path && !slash[1])) | 29 | if (!slash || (slash == path && !slash[1])) |
| 30 | return (char*)path; | 30 | return (char*)path; |
| 31 | 31 | ||
| 32 | return slash + 1; | 32 | return (char*)slash + 1; |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | /* | 35 | /* |
diff --git a/libbb/replace.c b/libbb/replace.c index bc26b04cc..273330f8a 100644 --- a/libbb/replace.c +++ b/libbb/replace.c | |||
| @@ -28,7 +28,8 @@ unsigned FAST_FUNC count_strstr(const char *str, const char *sub) | |||
| 28 | 28 | ||
| 29 | char* FAST_FUNC xmalloc_substitute_string(const char *src, int count, const char *sub, const char *repl) | 29 | char* FAST_FUNC xmalloc_substitute_string(const char *src, int count, const char *sub, const char *repl) |
| 30 | { | 30 | { |
| 31 | char *buf, *dst, *end; | 31 | char *buf, *dst; |
| 32 | const char *end; | ||
| 32 | size_t sub_len = strlen(sub); | 33 | size_t sub_len = strlen(sub); |
| 33 | size_t repl_len = strlen(repl); | 34 | size_t repl_len = strlen(repl); |
| 34 | 35 | ||
diff --git a/libbb/strrstr.c b/libbb/strrstr.c index a173b034f..bea5d1773 100644 --- a/libbb/strrstr.c +++ b/libbb/strrstr.c | |||
| @@ -19,10 +19,10 @@ char* FAST_FUNC strrstr(const char *haystack, const char *needle) | |||
| 19 | if (!needle[0]) | 19 | if (!needle[0]) |
| 20 | return (char*)haystack + strlen(haystack); | 20 | return (char*)haystack + strlen(haystack); |
| 21 | while (1) { | 21 | while (1) { |
| 22 | char *p = strstr(haystack, needle); | 22 | const char *p = strstr(haystack, needle); |
| 23 | if (!p) | 23 | if (!p) |
| 24 | return r; | 24 | return r; |
| 25 | r = p; | 25 | r = (char *)p; |
| 26 | haystack = p + 1; | 26 | haystack = p + 1; |
| 27 | } | 27 | } |
| 28 | } | 28 | } |
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c index ed10084b3..8afa1ef68 100644 --- a/libbb/xfuncs_printf.c +++ b/libbb/xfuncs_printf.c | |||
| @@ -379,7 +379,7 @@ void FAST_FUNC bb_unsetenv(const char *var) | |||
| 379 | char onstack[128 - 16]; /* smaller stack setup code on x86 */ | 379 | char onstack[128 - 16]; /* smaller stack setup code on x86 */ |
| 380 | char *tp; | 380 | char *tp; |
| 381 | 381 | ||
| 382 | tp = strchr(var, '='); | 382 | tp = (char*)strchr(var, '='); |
| 383 | if (tp) { | 383 | if (tp) { |
| 384 | /* In case var was putenv'ed, we can't replace '=' | 384 | /* In case var was putenv'ed, we can't replace '=' |
| 385 | * with NUL and unsetenv(var) - it won't work, | 385 | * with NUL and unsetenv(var) - it won't work, |
diff --git a/libpwdgrp/uidgid_get.c b/libpwdgrp/uidgid_get.c index d76eb8298..2aa444416 100644 --- a/libpwdgrp/uidgid_get.c +++ b/libpwdgrp/uidgid_get.c | |||
| @@ -32,7 +32,8 @@ int FAST_FUNC get_uidgid(struct bb_uidgid_t *u, const char *ug) | |||
| 32 | { | 32 | { |
| 33 | struct passwd *pwd; | 33 | struct passwd *pwd; |
| 34 | struct group *gr; | 34 | struct group *gr; |
| 35 | char *user, *group; | 35 | char *user; |
| 36 | const char *group; | ||
| 36 | unsigned n; | 37 | unsigned n; |
| 37 | 38 | ||
| 38 | user = (char*)ug; | 39 | user = (char*)ug; |
diff --git a/miscutils/bc.c b/miscutils/bc.c index 28bc40c8b..1ef8f418d 100644 --- a/miscutils/bc.c +++ b/miscutils/bc.c | |||
| @@ -5525,7 +5525,7 @@ static void xc_program_printString(const char *str) | |||
| 5525 | char c = *str++; | 5525 | char c = *str++; |
| 5526 | if (c == '\\') { | 5526 | if (c == '\\') { |
| 5527 | static const char esc[] ALIGN1 = "nabfrt""e\\"; | 5527 | static const char esc[] ALIGN1 = "nabfrt""e\\"; |
| 5528 | char *n; | 5528 | const char *n; |
| 5529 | 5529 | ||
| 5530 | c = *str++; | 5530 | c = *str++; |
| 5531 | n = strchr(esc, c); // note: if c is NUL, n = \0 at end of esc | 5531 | n = strchr(esc, c); // note: if c is NUL, n = \0 at end of esc |
diff --git a/networking/httpd.c b/networking/httpd.c index 3739fd55f..3b811cb71 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
| @@ -1846,7 +1846,7 @@ static void send_cgi_and_exit( | |||
| 1846 | */ | 1846 | */ |
| 1847 | static NOINLINE void send_file_and_exit(const char *url, int what) | 1847 | static NOINLINE void send_file_and_exit(const char *url, int what) |
| 1848 | { | 1848 | { |
| 1849 | char *suffix; | 1849 | const char *suffix; |
| 1850 | int fd; | 1850 | int fd; |
| 1851 | ssize_t count; | 1851 | ssize_t count; |
| 1852 | 1852 | ||
diff --git a/networking/ifconfig.c b/networking/ifconfig.c index 9ee232a66..32638e2a3 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c | |||
| @@ -336,7 +336,7 @@ int ifconfig_main(int argc UNUSED_PARAM, char **argv) | |||
| 336 | #endif | 336 | #endif |
| 337 | char *p; | 337 | char *p; |
| 338 | /*char host[128];*/ | 338 | /*char host[128];*/ |
| 339 | const char *host = NULL; /* make gcc happy */ | 339 | char *host = NULL; /* make gcc happy */ |
| 340 | IF_FEATURE_IFCONFIG_STATUS(char *show_all_param;) | 340 | IF_FEATURE_IFCONFIG_STATUS(char *show_all_param;) |
| 341 | 341 | ||
| 342 | did_flags = 0; | 342 | did_flags = 0; |
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index bc2dca506..6832ee0d4 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
| @@ -363,7 +363,7 @@ static char *parse(const char *command, struct interface_defn_t *ifd) | |||
| 363 | break; | 363 | break; |
| 364 | case '%': | 364 | case '%': |
| 365 | { | 365 | { |
| 366 | char *nextpercent; | 366 | const char *nextpercent; |
| 367 | char *varvalue; | 367 | char *varvalue; |
| 368 | 368 | ||
| 369 | command++; | 369 | command++; |
diff --git a/networking/nbd-client.c b/networking/nbd-client.c index 556fa8c97..4fda66125 100644 --- a/networking/nbd-client.c +++ b/networking/nbd-client.c | |||
| @@ -260,7 +260,7 @@ int nbdclient_main(int argc, char **argv) | |||
| 260 | // needs some other process to sit in ioctl(nbd, NBD_DO_IT). | 260 | // needs some other process to sit in ioctl(nbd, NBD_DO_IT). |
| 261 | if (fork() == 0) { | 261 | if (fork() == 0) { |
| 262 | /* child */ | 262 | /* child */ |
| 263 | char *s = strrchr(device, '/'); | 263 | const char *s = strrchr(device, '/'); |
| 264 | sprintf(data, "/sys/block/%.32s/pid", s ? s + 1 : device); | 264 | sprintf(data, "/sys/block/%.32s/pid", s ? s + 1 : device); |
| 265 | // Is it up yet? | 265 | // Is it up yet? |
| 266 | for (;;) { | 266 | for (;;) { |
diff --git a/networking/route.c b/networking/route.c index 6e2d30cfd..9d9b72416 100644 --- a/networking/route.c +++ b/networking/route.c | |||
| @@ -179,7 +179,7 @@ static NOINLINE void INET_setroute(int action, char **args) | |||
| 179 | memset(rt, 0, sizeof(*rt)); | 179 | memset(rt, 0, sizeof(*rt)); |
| 180 | 180 | ||
| 181 | { | 181 | { |
| 182 | const char *target = *args++; | 182 | char *target = *args++; |
| 183 | char *prefix; | 183 | char *prefix; |
| 184 | 184 | ||
| 185 | /* recognize x.x.x.x/mask format. */ | 185 | /* recognize x.x.x.x/mask format. */ |
| @@ -353,25 +353,25 @@ static NOINLINE void INET6_setroute(int action, char **args) | |||
| 353 | int prefix_len, skfd; | 353 | int prefix_len, skfd; |
| 354 | const char *devname; | 354 | const char *devname; |
| 355 | 355 | ||
| 356 | /* We know args isn't NULL from the check in route_main. */ | 356 | /* We know args isn't NULL from the check in route_main. */ |
| 357 | const char *target = *args++; | 357 | char *target = *args++; |
| 358 | 358 | ||
| 359 | if (strcmp(target, "default") == 0) { | 359 | if (strcmp(target, "default") == 0) { |
| 360 | prefix_len = 0; | 360 | prefix_len = 0; |
| 361 | memset(&sa6, 0, sizeof(sa6)); | 361 | memset(&sa6, 0, sizeof(sa6)); |
| 362 | } else { | ||
| 363 | char *cp; | ||
| 364 | cp = strchr(target, '/'); /* Yes... const to non is ok. */ | ||
| 365 | if (cp) { | ||
| 366 | *cp = '\0'; | ||
| 367 | prefix_len = xatoul_range(cp + 1, 0, 128); | ||
| 362 | } else { | 368 | } else { |
| 363 | char *cp; | 369 | prefix_len = 128; |
| 364 | cp = strchr(target, '/'); /* Yes... const to non is ok. */ | ||
| 365 | if (cp) { | ||
| 366 | *cp = '\0'; | ||
| 367 | prefix_len = xatoul_range(cp + 1, 0, 128); | ||
| 368 | } else { | ||
| 369 | prefix_len = 128; | ||
| 370 | } | ||
| 371 | if (INET6_resolve(target, (struct sockaddr_in6 *) &sa6) < 0) { | ||
| 372 | bb_error_msg_and_die("resolving %s", target); | ||
| 373 | } | ||
| 374 | } | 370 | } |
| 371 | if (INET6_resolve(target, (struct sockaddr_in6 *) &sa6) < 0) { | ||
| 372 | bb_error_msg_and_die("resolving %s", target); | ||
| 373 | } | ||
| 374 | } | ||
| 375 | 375 | ||
| 376 | /* Clean out the RTREQ structure. */ | 376 | /* Clean out the RTREQ structure. */ |
| 377 | memset(&rt, 0, sizeof(rt)); | 377 | memset(&rt, 0, sizeof(rt)); |
diff --git a/networking/udhcp/d6_socket.c b/networking/udhcp/d6_socket.c index acf108367..83df4b396 100644 --- a/networking/udhcp/d6_socket.c +++ b/networking/udhcp/d6_socket.c | |||
| @@ -116,7 +116,8 @@ int FAST_FUNC d6_listen_socket(int port, const char *inf) | |||
| 116 | bb_simple_perror_msg_and_die("SO_BROADCAST"); | 116 | bb_simple_perror_msg_and_die("SO_BROADCAST"); |
| 117 | 117 | ||
| 118 | /* SO_BINDTODEVICE doesn't work on ethernet aliases (ethN:M) */ | 118 | /* SO_BINDTODEVICE doesn't work on ethernet aliases (ethN:M) */ |
| 119 | colon = strrchr(inf, ':'); | 119 | colon = (char*)strrchr(inf, ':'); |
| 120 | /* NB: inf can really be a *const* string if it's a default, but defaults have no ':' */ | ||
| 120 | if (colon) | 121 | if (colon) |
| 121 | *colon = '\0'; | 122 | *colon = '\0'; |
| 122 | 123 | ||
diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c index 35e10688b..5d2283eaf 100644 --- a/networking/udhcp/socket.c +++ b/networking/udhcp/socket.c | |||
| @@ -90,7 +90,8 @@ int FAST_FUNC udhcp_listen_socket(/*uint32_t ip,*/ int port, const char *inf) | |||
| 90 | bb_simple_perror_msg_and_die("SO_BROADCAST"); | 90 | bb_simple_perror_msg_and_die("SO_BROADCAST"); |
| 91 | 91 | ||
| 92 | /* SO_BINDTODEVICE doesn't work on ethernet aliases (ethN:M) */ | 92 | /* SO_BINDTODEVICE doesn't work on ethernet aliases (ethN:M) */ |
| 93 | colon = strrchr(inf, ':'); | 93 | colon = (char*)strrchr(inf, ':'); |
| 94 | /* NB: inf can really be a *const* string if it's a default, but defaults have no ':' */ | ||
| 94 | if (colon) | 95 | if (colon) |
| 95 | *colon = '\0'; | 96 | *colon = '\0'; |
| 96 | 97 | ||
diff --git a/printutils/lpr.c b/printutils/lpr.c index 25b0f7235..464208c65 100644 --- a/printutils/lpr.c +++ b/printutils/lpr.c | |||
| @@ -122,7 +122,7 @@ int lpqr_main(int argc UNUSED_PARAM, char **argv) | |||
| 122 | 122 | ||
| 123 | { | 123 | { |
| 124 | // queue name is to the left of '@' | 124 | // queue name is to the left of '@' |
| 125 | char *s = strchr(queue, '@'); | 125 | char *s = (char *)strchr(queue, '@'); |
| 126 | if (s) { | 126 | if (s) { |
| 127 | // server name is to the right of '@' | 127 | // server name is to the right of '@' |
| 128 | *s = '\0'; | 128 | *s = '\0'; |
diff --git a/procps/nmeter.c b/procps/nmeter.c index dca07eac6..fd8907aac 100644 --- a/procps/nmeter.c +++ b/procps/nmeter.c | |||
| @@ -913,7 +913,8 @@ int nmeter_main(int argc UNUSED_PARAM, char **argv) | |||
| 913 | // parameters as seen by e.g. ps. Making a copy... | 913 | // parameters as seen by e.g. ps. Making a copy... |
| 914 | cur = xstrdup(argv[0]); | 914 | cur = xstrdup(argv[0]); |
| 915 | while (1) { | 915 | while (1) { |
| 916 | char *param, *p; | 916 | char *param; |
| 917 | const char *p; | ||
| 917 | prev = cur; | 918 | prev = cur; |
| 918 | again: | 919 | again: |
| 919 | cur = strchr(cur, '%'); | 920 | cur = strchr(cur, '%'); |
| @@ -929,7 +930,7 @@ int nmeter_main(int argc UNUSED_PARAM, char **argv) | |||
| 929 | // format: %[foptstring] | 930 | // format: %[foptstring] |
| 930 | cur++; | 931 | cur++; |
| 931 | p = strchr(options, cur[0]); | 932 | p = strchr(options, cur[0]); |
| 932 | param = cur+1; | 933 | param = cur + 1; |
| 933 | while (cur[0] != ']') { | 934 | while (cur[0] != ']') { |
| 934 | if (!cur[0]) | 935 | if (!cur[0]) |
| 935 | bb_show_usage(); | 936 | bb_show_usage(); |
diff --git a/procps/powertop.c b/procps/powertop.c index 6fe892540..a24748efc 100644 --- a/procps/powertop.c +++ b/procps/powertop.c | |||
| @@ -238,7 +238,7 @@ static void save_line(const char *string, int count) | |||
| 238 | #if ENABLE_FEATURE_POWERTOP_PROCIRQ | 238 | #if ENABLE_FEATURE_POWERTOP_PROCIRQ |
| 239 | static int is_hpet_irq(const char *name) | 239 | static int is_hpet_irq(const char *name) |
| 240 | { | 240 | { |
| 241 | char *p; | 241 | const char *p; |
| 242 | # if BLOATY_HPET_IRQ_NUM_DETECTION | 242 | # if BLOATY_HPET_IRQ_NUM_DETECTION |
| 243 | long hpet_chan; | 243 | long hpet_chan; |
| 244 | 244 | ||
| @@ -423,7 +423,8 @@ static NOINLINE int process_timer_stats(void) | |||
| 423 | // 1, 2159 udisks-daemon hrtimer_start_range_ns (hrtimer_wakeup) | 423 | // 1, 2159 udisks-daemon hrtimer_start_range_ns (hrtimer_wakeup) |
| 424 | // 331 total events, 249.059 events/sec | 424 | // 331 total events, 249.059 events/sec |
| 425 | while (fgets(buf, sizeof(buf), fp)) { | 425 | while (fgets(buf, sizeof(buf), fp)) { |
| 426 | const char *count, *process, *func; | 426 | const char *process, *func; |
| 427 | char *count; | ||
| 427 | char *p; | 428 | char *p; |
| 428 | int idx; | 429 | int idx; |
| 429 | unsigned cnt; | 430 | unsigned cnt; |
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 249a3195e..d13a7d66b 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
| @@ -348,7 +348,7 @@ int conf_write(const char *name) | |||
| 348 | dirname[0] = 0; | 348 | dirname[0] = 0; |
| 349 | if (name && name[0]) { | 349 | if (name && name[0]) { |
| 350 | struct stat st; | 350 | struct stat st; |
| 351 | char *slash; | 351 | const char *slash; |
| 352 | 352 | ||
| 353 | if (!stat(name, &st) && S_ISDIR(st.st_mode)) { | 353 | if (!stat(name, &st) && S_ISDIR(st.st_mode)) { |
| 354 | strcpy(dirname, name); | 354 | strcpy(dirname, name); |
diff --git a/shell/ash.c b/shell/ash.c index 4f824e1b2..19623a9a0 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -8725,7 +8725,7 @@ test_exec(/*const char *fullname,*/ struct stat *statb) | |||
| 8725 | } | 8725 | } |
| 8726 | 8726 | ||
| 8727 | /* Circular dep: find_command->find_builtin->builtintab[]->hashcmd->find_command */ | 8727 | /* Circular dep: find_command->find_builtin->builtintab[]->hashcmd->find_command */ |
| 8728 | static struct builtincmd *find_builtin(const char *name); | 8728 | static const struct builtincmd *find_builtin(const char *name); |
| 8729 | #if ENABLE_ASH_BASH_NOT_FOUND_HOOK | 8729 | #if ENABLE_ASH_BASH_NOT_FOUND_HOOK |
| 8730 | static int evalfun(struct funcnode *func, int argc, char **argv, int flags); | 8730 | static int evalfun(struct funcnode *func, int argc, char **argv, int flags); |
| 8731 | #endif | 8731 | #endif |
| @@ -8746,7 +8746,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path) | |||
| 8746 | struct stat statb; | 8746 | struct stat statb; |
| 8747 | int e; | 8747 | int e; |
| 8748 | int updatetbl; | 8748 | int updatetbl; |
| 8749 | struct builtincmd *bcmd; | 8749 | const struct builtincmd *bcmd; |
| 8750 | int len; | 8750 | int len; |
| 8751 | 8751 | ||
| 8752 | /* If name contains a slash, don't use PATH or hash table */ | 8752 | /* If name contains a slash, don't use PATH or hash table */ |
| @@ -10836,10 +10836,10 @@ static const struct builtincmd builtintab[] = { | |||
| 10836 | /* | 10836 | /* |
| 10837 | * Search the table of builtin commands. | 10837 | * Search the table of builtin commands. |
| 10838 | */ | 10838 | */ |
| 10839 | static struct builtincmd * | 10839 | static const struct builtincmd * |
| 10840 | find_builtin(const char *name) | 10840 | find_builtin(const char *name) |
| 10841 | { | 10841 | { |
| 10842 | struct builtincmd *bp; | 10842 | const struct builtincmd *bp; |
| 10843 | 10843 | ||
| 10844 | bp = bsearch( | 10844 | bp = bsearch( |
| 10845 | name, builtintab, ARRAY_SIZE(builtintab), sizeof(builtintab[0]), | 10845 | name, builtintab, ARRAY_SIZE(builtintab), sizeof(builtintab[0]), |
| @@ -12927,12 +12927,12 @@ decode_dollar_squote(void) | |||
| 12927 | { | 12927 | { |
| 12928 | static const char C_escapes[] ALIGN1 = "nrbtfav""x\\01234567"; | 12928 | static const char C_escapes[] ALIGN1 = "nrbtfav""x\\01234567"; |
| 12929 | int c, cnt; | 12929 | int c, cnt; |
| 12930 | char *p; | ||
| 12931 | char buf[4]; | 12930 | char buf[4]; |
| 12932 | 12931 | ||
| 12933 | c = pgetc(); | 12932 | c = pgetc(); |
| 12934 | p = strchr(C_escapes, c); | 12933 | if (strchr(C_escapes, c)) { |
| 12935 | if (p) { | 12934 | char *p; |
| 12935 | |||
| 12936 | buf[0] = c; | 12936 | buf[0] = c; |
| 12937 | p = buf; | 12937 | p = buf; |
| 12938 | cnt = 3; | 12938 | cnt = 3; |
