summaryrefslogtreecommitdiffstats
path: root/libmandoc.h
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@netbsd.org>2014-01-05 19:10:56 +0000
committerJoerg Sonnenberger <joerg@netbsd.org>2014-01-05 19:10:56 +0000
commit5e614e747c24e529f84dbfb18721534f909128e9 (patch)
tree6b95f33544f611ed2bc6889a77a346526e7c4d0e /libmandoc.h
parentbfc2a1a7b08ccfe41610d07abb12b2eca5139716 (diff)
downloadmandoc-5e614e747c24e529f84dbfb18721534f909128e9.tar.gz
Tag functions with format strings as arguments as printf-like.
Fix one case where a non-literal is used as format string. Fix another case where a variable is formatted using the wrong type.
Diffstat (limited to 'libmandoc.h')
-rw-r--r--libmandoc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libmandoc.h b/libmandoc.h
index 198184a0..fdffe625 100644
--- a/libmandoc.h
+++ b/libmandoc.h
@@ -38,6 +38,9 @@ struct man;
void mandoc_msg(enum mandocerr, struct mparse *,
int, int, const char *);
+#if __GNUC__ - 0 >= 4
+__attribute__((__format__ (__printf__, 5, 6)))
+#endif
void mandoc_vmsg(enum mandocerr, struct mparse *,
int, int, const char *, ...);
char *mandoc_getarg(struct mparse *, char **, int, int *);