浏览代码

Fix build break

master
Arun Prakash Jana 5 年前
父节点
当前提交
7cb2d22e9f
找不到此签名对应的密钥 GPG 密钥 ID: A75979F35C080412
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. +1
    -1
      Makefile
  2. +3
    -3
      src/nnn.c

+ 1
- 1
Makefile 查看文件

@@ -18,7 +18,7 @@ else
LDLIBS_CURSES ?= -lncurses LDLIBS_CURSES ?= -lncurses
endif endif


CFLAGS += -Wall -Wextra -Wno-unused-parameter -Wno-format-truncation
CFLAGS += -Wall -Wextra -Wno-unused-parameter
CFLAGS += $(CFLAGS_OPTIMIZATION) CFLAGS += $(CFLAGS_OPTIMIZATION)
CFLAGS += $(CFLAGS_CURSES) CFLAGS += $(CFLAGS_CURSES)




+ 3
- 3
src/nnn.c 查看文件

@@ -2019,7 +2019,7 @@ static char *coolsize(off_t size)
{ {
static const char * const U = "BKMGTPEZY"; static const char * const U = "BKMGTPEZY";
static char size_buf[12]; /* Buffer to hold human readable size */ static char size_buf[12]; /* Buffer to hold human readable size */
off_t rem;
static off_t rem;
int i; int i;


rem = i = 0; rem = i = 0;
@@ -2067,9 +2067,9 @@ static char *coolsize(off_t size)
} }


if (i > 0 && i < 6) 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 else
snprintf(size_buf, 12, "%lu%c", size, U[i]);
snprintf(size_buf, 12, "%lu%c", (ulong)size, U[i]);


return size_buf; return size_buf;
} }


正在加载...
取消
保存