summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-07-19 13:36:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-07-19 13:36:13 +0000
commitaf5633117326edd60450c53218694c3e0a895639 (patch)
treeb6879fc1b21fcf25e8f558cc4d83f3c02404bbec /mandocdb.c
parent0d64a6e6bb89ff458faef3450acd365244bcf4a8 (diff)
downloadmandoc-af5633117326edd60450c53218694c3e0a895639.tar.gz
Use __attribute__((__format__ throughout.
Triggered by a smaller patch from Christos Zoulas. While here, unify style, move several config tests to config.h, and delete the useless MANDOC_CONFIG_H.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 40de09f1..e08d855a 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -185,7 +185,8 @@ static void putkeys(const struct mpage *, char *, size_t, uint64_t);
static void putmdockey(const struct mpage *,
const struct roff_node *, uint64_t);
static int render_string(char **, size_t *);
-static void say(const char *, const char *, ...);
+static void say(const char *, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)));
static int set_basedir(const char *, int);
static int treescan(void);
static size_t utf8(unsigned int, char [7]);
@@ -1818,7 +1819,7 @@ 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=%d", sz, cp, v);
+ "Adding name %*s, bits=0x%llu", (int)sz, cp, v);
} else {
htab = &strings;
if (debug > 1)
@@ -1826,7 +1827,7 @@ putkeys(const struct mpage *mpage, char *cp, size_t sz, uint64_t v)
if ((uint64_t)1 << i & v)
say(mpage->mlinks->file,
"Adding key %s=%*s",
- mansearch_keynames[i], sz, cp);
+ mansearch_keynames[i], (int)sz, cp);
}
end = cp + sz;