summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2016-08-23 21:33:48 +0200
committerGuillem Jover <guillem@debian.org>2016-10-30 04:45:32 +0100
commitf10a135c0e22cac01a68c08a3aea2303eb7d4f37 (patch)
treebf0947138f0bd7668936decb5e6796c1324e4271 /src
parent57b2ce9c2db08c74eeba0872740da1be09ce6874 (diff)
downloaddpkg-f10a135c0e22cac01a68c08a3aea2303eb7d4f37.tar.gz
Cast off_t variables to intmax_t when printing them with %jd
Warned-by: clang
Diffstat (limited to 'src')
-rw-r--r--src/archives.c4
-rw-r--r--src/configure.c3
2 files changed, 4 insertions, 3 deletions
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 <dirent.h>
#include <termios.h>
#include <unistd.h>
+#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
@@ -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);