X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=libbb%2Fdump.c;h=7d923083ad7e94255060e2aa79c2a4ac9788bc2e;hb=7600eec7325f0bbce1dcbf08e76c1653bf35b397;hp=52a6c063b77b791ff9daf7cb0448dcfed834426c;hpb=70060d25d23278f6b636a535edca4a0c4006decd;p=oweals%2Fbusybox.git diff --git a/libbb/dump.c b/libbb/dump.c index 52a6c063b..7d923083a 100644 --- a/libbb/dump.c +++ b/libbb/dump.c @@ -24,6 +24,7 @@ #include #include +#include #include /* for isdigit() */ #include "libbb.h" #include "dump.h" @@ -498,7 +499,7 @@ static void conv_u(PR * pr, u_char * p) /* od used nl, not lf */ if (*p <= 0x1f) { *pr->cchar = 's'; - printf(pr->fmt, list[4 * (int)(*p)]); + printf(pr->fmt, list + (4 * (int)*p)); } else if (*p == 0x7f) { *pr->cchar = 's'; printf(pr->fmt, "del"); @@ -544,7 +545,7 @@ static void display(void) /* PRINT; */ switch (pr->flags) { case F_ADDRESS: - printf(pr->fmt, address); + printf(pr->fmt, (unsigned int) address); break; case F_BPAD: printf(pr->fmt, ""); @@ -694,7 +695,7 @@ void bb_dump_add(const char *fmt) /* start new linked list of format units */ /* NOSTRICT */ - tfs = (FS *) xcalloc(1,sizeof(FS)); /*DBU:[dave@cray.com] start out NULL */ + tfs = (FS *) xcalloc(1,sizeof(FS)); /*DBU:[dave@cray.com] start out NULL */ if (!bb_dump_fshead) { bb_dump_fshead = tfs; } else {