From f10a135c0e22cac01a68c08a3aea2303eb7d4f37 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 23 Aug 2016 21:33:48 +0200 Subject: Cast off_t variables to intmax_t when printing them with %jd Warned-by: clang --- src/archives.c | 4 ++-- src/configure.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/archives.c b/src/archives.c index d07d4a450..71118ff79 100644 --- a/src/archives.c +++ b/src/archives.c @@ -548,7 +548,7 @@ tarobject_matches(struct tarcontext *tc, ohshite(_("unable to read link '%.255s'"), fn_old); else if (linksize != stab->st_size) ohshit(_("symbolic link '%.250s' size has changed from %jd to %zd"), - fn_old, stab->st_size, linksize); + fn_old, (intmax_t)stab->st_size, linksize); linkname[linksize] = '\0'; if (strcmp(linkname, te->linkname) == 0) { free(linkname); @@ -1035,7 +1035,7 @@ tarobject(void *ctx, struct tar_entry *ti) ohshite(_("unable to read link '%.255s'"), ti->name); else if (r != stab.st_size) ohshit(_("symbolic link '%.250s' size has changed from %jd to %zd"), - fnamevb.buf, stab.st_size, r); + fnamevb.buf, (intmax_t)stab.st_size, r); varbuf_trunc(&symlinkfn, r); varbuf_end_str(&symlinkfn); if (symlink(symlinkfn.buf,fnametmpvb.buf)) diff --git a/src/configure.c b/src/configure.c index 690a85248..36b04306e 100644 --- a/src/configure.c +++ b/src/configure.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -759,7 +760,7 @@ conffderef(struct pkginfo *pkg, struct varbuf *result, const char *in) } else if (r != stab.st_size) { warning(_("symbolic link '%.250s' size has " "changed from %jd to %zd"), - result->buf, stab.st_size, r); + result->buf, (intmax_t)stab.st_size, r); return -1; } varbuf_trunc(&target, r); -- cgit v1.2.3