diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-10-22 10:08:32 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-10-22 10:08:32 +0000 |
commit | a8a0a34795f8adeb4ca91de8279ea858c4cb42bc (patch) | |
tree | fd9ddd29a693ff286f39d594be811846858423a2 /usr.bin/mandoc | |
parent | 6d559b373bdbc032b3d8dc7e60da9da66c8bf05e (diff) |
cast off_t and uint64_t for printf(3)
to make sure that widths match on all platforms;
from Ed Maste <emaste at freebsd dot org>;
OK guenther@
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/dbm_map.c | 4 | ||||
-rw-r--r-- | usr.bin/mandoc/mandocdb.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/mandoc/dbm_map.c b/usr.bin/mandoc/dbm_map.c index 5b269f8a380..b68e6d14c6f 100644 --- a/usr.bin/mandoc/dbm_map.c +++ b/usr.bin/mandoc/dbm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dbm_map.c,v 1.4 2016/10/20 16:12:14 schwarze Exp $ */ +/* $OpenBSD: dbm_map.c,v 1.5 2016/10/22 10:08:31 schwarze Exp $ */ /* * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> * @@ -91,7 +91,7 @@ dbm_map(const char *fname) max_offset = be32toh(*dbm_getint(3)) + sizeof(int32_t); if (st.st_size != max_offset) { warnx("dbm_map(%s): Inconsistent file size %lld (expected %d)", - fname, st.st_size, max_offset); + fname, (long long)st.st_size, max_offset); errno = EFTYPE; goto fail; } diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c index 7090b8f89a3..211b810921b 100644 --- a/usr.bin/mandoc/mandocdb.c +++ b/usr.bin/mandoc/mandocdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mandocdb.c,v 1.182 2016/10/20 16:29:13 schwarze Exp $ */ +/* $OpenBSD: mandocdb.c,v 1.183 2016/10/22 10:08:31 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011-2016 Ingo Schwarze <schwarze@openbsd.org> @@ -1699,7 +1699,8 @@ putkeys(const struct mpage *mpage, char *cp, size_t sz, uint64_t v) name_mask &= ~NAME_FIRST; if (debug > 1) say(mpage->mlinks->file, - "Adding name %*s, bits=0x%llx", (int)sz, cp, v); + "Adding name %*s, bits=0x%llx", (int)sz, cp, + (unsigned long long)v); } else { htab = &strings; if (debug > 1) |