Fix build break

This commit is contained in:
Arun Prakash Jana 2019-05-09 18:45:47 +05:30
parent 2297373306
commit 7cb2d22e9f
No known key found for this signature in database
GPG key ID: A75979F35C080412
2 changed files with 4 additions and 4 deletions

View file

@ -18,7 +18,7 @@ else
LDLIBS_CURSES ?= -lncurses
endif
CFLAGS += -Wall -Wextra -Wno-unused-parameter -Wno-format-truncation
CFLAGS += -Wall -Wextra -Wno-unused-parameter
CFLAGS += $(CFLAGS_OPTIMIZATION)
CFLAGS += $(CFLAGS_CURSES)

View file

@ -2019,7 +2019,7 @@ static char *coolsize(off_t size)
{
static const char * const U = "BKMGTPEZY";
static char size_buf[12]; /* Buffer to hold human readable size */
off_t rem;
static off_t rem;
int i;
rem = i = 0;
@ -2067,9 +2067,9 @@ static char *coolsize(off_t size)
}
if (i > 0 && i < 6)
snprintf(size_buf, 12, "%lu.%0*lu%c", size, i, rem, U[i]);
snprintf(size_buf, 12, "%lu.%0*lu%c", (ulong)size, i, (ulong)rem, U[i]);
else
snprintf(size_buf, 12, "%lu%c", size, U[i]);
snprintf(size_buf, 12, "%lu%c", (ulong)size, U[i]);
return size_buf;
}