diff options
author | Jan Engelhardt <jengelh@inai.de> | 2019-09-08 23:48:21 +0200 |
---|---|---|
committer | Gao Xiang <hsiangkao@aol.com> | 2019-09-09 07:44:21 +0800 |
commit | 1530200afd95d4e39f43a02105ee35032ee2a10b (patch) | |
tree | 2eab42f54c734c03e554d3bc10a091457e50407e /lib/inode.c | |
parent | 3d45c540d24c38aed7ff916000a1c5f5fd282f5c (diff) |
erofs-utils: build: cure compiler warnings
On i586 I observe:
In file included from inode.c:16:
inode.c: In function 'erofs_mkfs_build_tree':
../include/erofs/print.h:27:21: error: format '%lu' expects argument of type
'long unsigned int', but argument 7 has type 'erofs_nid_t' {aka 'long long unsigned int'} [-Werror=format=]
27 | #define pr_fmt(fmt) "EROFS: " FUNC_LINE_FMT fmt "\n"
../include/erofs/print.h:43:4: note: in expansion of macro 'pr_fmt'
43 | pr_fmt(fmt), \
inode.c:792:3: note: in expansion of macro 'erofs_info'
792 | erofs_info("add file %s/%s (nid %lu, type %d)",
inode.c:792:37: note: format string is defined here
792 | erofs_info("add file %s/%s (nid %lu, type %d)",
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
[ Gao Xiang: minor update, and fix subject line. ]
Signed-off-by: Gao Xiang <hsiangkao@aol.com>
Diffstat (limited to 'lib/inode.c')
-rw-r--r-- | lib/inode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/inode.c b/lib/inode.c index 141a300..e3495f4 100644 --- a/lib/inode.c +++ b/lib/inode.c @@ -789,8 +789,9 @@ fail: d->type = erofs_type_by_mode[d->inode->i_mode >> S_SHIFT]; erofs_d_invalidate(d); - erofs_info("add file %s/%s (nid %lu, type %d)", - dir->i_srcpath, d->name, d->nid, d->type); + erofs_info("add file %s/%s (nid %llu, type %d)", + dir->i_srcpath, d->name, (unsigned long long)d->nid, + d->type); } erofs_write_dir_file(dir); erofs_write_tail_end(dir); |