diff options
Diffstat (limited to 'coreutils')
| -rw-r--r-- | coreutils/od_bloaty.c | 7 | ||||
| -rw-r--r-- | coreutils/printf.c | 2 |
2 files changed, 5 insertions, 4 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); |
