diff options
author | Joerg Sonnenberger <joerg@netbsd.org> | 2014-01-05 19:10:56 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@netbsd.org> | 2014-01-05 19:10:56 +0000 |
commit | d9597fb775134ff4c4ae106fdb7f3214b5af2463 (patch) | |
tree | dce4ca23417904d6be1f14b7df1868abe7ff2eb3 /libmandoc.h | |
parent | 1e7939918df65f9471cdc0622fe36a0ff3a6ebc9 (diff) | |
download | mandoc-d9597fb775134ff4c4ae106fdb7f3214b5af2463.tar.gz mandoc-d9597fb775134ff4c4ae106fdb7f3214b5af2463.tar.zst mandoc-d9597fb775134ff4c4ae106fdb7f3214b5af2463.zip |
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.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libmandoc.h b/libmandoc.h index 192346a0..ab243ff9 100644 --- a/libmandoc.h +++ b/libmandoc.h @@ -1,4 +1,4 @@ -/* $Id: libmandoc.h,v 1.36 2013/12/31 23:23:10 schwarze Exp $ */ +/* $Id: libmandoc.h,v 1.37 2014/01/05 19:10:56 joerg Exp $ */ /* * Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -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 *); |