From: Jan Engelhardt <jengelh@inai.de>
To: hsiangkao@aol.com
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH erofs-utils] build: cure compiler warnings
Date: Sun, 8 Sep 2019 17:53:22 +0200 [thread overview]
Message-ID: <20190908155322.22828-1-jengelh@inai.de> (raw)
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)",
---
lib/compress.c | 2 +-
lib/inode.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/compress.c b/lib/compress.c
index a977c87..8d97e82 100644
--- a/lib/compress.c
+++ b/lib/compress.c
@@ -457,7 +457,7 @@ int erofs_write_compressed_file(struct erofs_inode *inode)
ret = erofs_bh_balloon(bh, blknr_to_addr(compressed_blocks));
DBG_BUGON(ret);
- erofs_info("compressed %s (%lu bytes) into %u blocks",
+ erofs_info("compressed %s (%llu bytes) into %u blocks",
inode->i_srcpath, inode->i_size, compressed_blocks);
/*
diff --git a/lib/inode.c b/lib/inode.c
index 141a300..a514303 100644
--- a/lib/inode.c
+++ b/lib/inode.c
@@ -789,7 +789,7 @@ 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)",
+ erofs_info("add file %s/%s (nid %llu, type %d)",
dir->i_srcpath, d->name, d->nid, d->type);
}
erofs_write_dir_file(dir);
--
2.23.0
reply other threads:[~2019-09-08 15:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190908155322.22828-1-jengelh@inai.de \
--to=jengelh@inai.de \
--cc=hsiangkao@aol.com \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).