diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-04-06 18:26:33 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-04-06 18:26:33 +0200 |
| commit | 2ab994f7079daa052f8816b72e215e1609d41f76 (patch) | |
| tree | 327d8bbe704fec424f8842471873ff41b8c15729 /libbb | |
| parent | f5018dac21df54647d0982ed4bebd0286d77cc56 (diff) | |
| download | busybox-w32-2ab994f7079daa052f8816b72e215e1609d41f76.tar.gz busybox-w32-2ab994f7079daa052f8816b72e215e1609d41f76.tar.bz2 busybox-w32-2ab994f7079daa052f8816b72e215e1609d41f76.zip | |
placate gcc-8.0.1 warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
| -rw-r--r-- | libbb/dump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libbb/dump.c b/libbb/dump.c index db91fcfe7..5941ef902 100644 --- a/libbb/dump.c +++ b/libbb/dump.c | |||
| @@ -464,11 +464,9 @@ static const char conv_str[] ALIGN1 = | |||
| 464 | "\v" "\\""v""\0" | 464 | "\v" "\\""v""\0" |
| 465 | ; | 465 | ; |
| 466 | 466 | ||
| 467 | |||
| 468 | static void conv_c(PR *pr, unsigned char *p) | 467 | static void conv_c(PR *pr, unsigned char *p) |
| 469 | { | 468 | { |
| 470 | const char *str = conv_str; | 469 | const char *str = conv_str; |
| 471 | char buf[10]; | ||
| 472 | 470 | ||
| 473 | do { | 471 | do { |
| 474 | if (*p == *str) { | 472 | if (*p == *str) { |
| @@ -482,7 +480,9 @@ static void conv_c(PR *pr, unsigned char *p) | |||
| 482 | *pr->cchar = 'c'; | 480 | *pr->cchar = 'c'; |
| 483 | printf(pr->fmt, *p); | 481 | printf(pr->fmt, *p); |
| 484 | } else { | 482 | } else { |
| 485 | sprintf(buf, "%03o", (int) *p); | 483 | char buf[4]; |
| 484 | /* gcc-8.0.1 needs lots of casts to shut up */ | ||
| 485 | sprintf(buf, "%03o", (unsigned)(uint8_t)*p); | ||
| 486 | str = buf; | 486 | str = buf; |
| 487 | strpr: | 487 | strpr: |
| 488 | *pr->cchar = 's'; | 488 | *pr->cchar = 's'; |
