diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2016-07-19 13:36:13 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2016-07-19 13:36:13 +0000 |
commit | af5633117326edd60450c53218694c3e0a895639 (patch) | |
tree | b6879fc1b21fcf25e8f558cc4d83f3c02404bbec /mandocdb.c | |
parent | 0d64a6e6bb89ff458faef3450acd365244bcf4a8 (diff) | |
download | mandoc-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.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; |