From: Petr Vorel <petr.vorel@gmail.com>
To: linux-nfs@vger.kernel.org
Cc: Petr Vorel <petr.vorel@gmail.com>, Steve Dickson <steved@redhat.com>
Subject: [nfs-utils PATCH 2/2] nfsdcltrack/nfsdcltrack.c: Fix printf format
Date: Thu, 22 Jul 2021 18:15:45 +0200 [thread overview]
Message-ID: <20210722161545.26923-2-petr.vorel@gmail.com> (raw)
In-Reply-To: <20210722161545.26923-1-petr.vorel@gmail.com>
nfsdcltrack.c: In function 'cltrack_gracedone':
nfsdcltrack.c:528:47: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'time_t' {aka 'long long int'} [-Werror=format=]
528 | xlog(D_GENERAL, "%s: grace done. gracetime=%ld", __func__, gracetime);
| ~~^ ~~~~~~~~~
| | |
| long int time_t {aka long long int}
| %lld
Found in Buildroot riscv32 build.
Link: http://autobuild.buildroot.net/results/9bc1d43a588338b7395af7bc97535ee16a6ea2d9/build-end.log
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
utils/nfsdcltrack/nfsdcltrack.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/utils/nfsdcltrack/nfsdcltrack.c b/utils/nfsdcltrack/nfsdcltrack.c
index e926f1c0..0b37c094 100644
--- a/utils/nfsdcltrack/nfsdcltrack.c
+++ b/utils/nfsdcltrack/nfsdcltrack.c
@@ -33,6 +33,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <unistd.h>
#include <libgen.h>
#include <sys/inotify.h>
@@ -525,7 +526,7 @@ cltrack_gracedone(const char *timestr)
if (*tail)
return -EINVAL;
- xlog(D_GENERAL, "%s: grace done. gracetime=%ld", __func__, gracetime);
+ xlog(D_GENERAL, "%s: grace done. gracetime=%"PRIu64, __func__, gracetime);
ret = sqlite_remove_unreclaimed(gracetime);
--
2.32.0
next prev parent reply other threads:[~2021-07-22 16:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 16:15 [nfs-utils PATCH 1/2] nfsdcltrack/sqlite: Fix printf format Petr Vorel
2021-07-22 16:15 ` Petr Vorel [this message]
2021-07-26 16:31 ` Steve Dickson
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=20210722161545.26923-2-petr.vorel@gmail.com \
--to=petr.vorel@gmail.com \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.com \
/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).