diff options
author | Petr Vorel <petr.vorel@gmail.com> | 2021-07-25 13:09:59 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2021-07-26 12:07:37 -0400 |
commit | 4f2a5b64386600430ec6b71e57b88c5efaa70aed (patch) | |
tree | 46e43f624d73dc4afb825b40fa0180426aa2f040 /utils | |
parent | 4dd8d833c9350d42528ada0fd65aee41b712f41d (diff) | |
download | nfs-utils-4f2a5b64386600430ec6b71e57b88c5efaa70aed.tar.gz |
nfsdcltrack/sqlite: Fix printf format
sqlite.c: In function 'sqlite_remove_unreclaimed':
sqlite.c:547:71: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'time_t' {aka 'long long int'} [-Werror=format=]
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/nfsdcltrack/sqlite.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/nfsdcltrack/sqlite.c b/utils/nfsdcltrack/sqlite.c index f79aebb..cea4a41 100644 --- a/utils/nfsdcltrack/sqlite.c +++ b/utils/nfsdcltrack/sqlite.c @@ -46,6 +46,7 @@ #include <sys/stat.h> #include <sys/types.h> #include <fcntl.h> +#include <inttypes.h> #include <unistd.h> #include <sqlite3.h> #include <linux/limits.h> @@ -544,7 +545,7 @@ sqlite_remove_unreclaimed(time_t grace_start) int ret; char *err = NULL; - ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %ld", + ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %"PRIu64, grace_start); if (ret < 0) { return ret; |