From 607678e917a8a274f92445854c58aaaa05b824a8 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 19 Jul 2016 13:36:13 +0000 Subject: 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. --- mandocdb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'mandocdb.c') diff --git a/mandocdb.c b/mandocdb.c index d5052db9..b885dd5c 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.219 2016/07/15 18:03:45 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.220 2016/07/19 13:36:13 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011-2016 Ingo Schwarze @@ -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; -- cgit v1.2.3-56-ge451