From d9597fb775134ff4c4ae106fdb7f3214b5af2463 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Sun, 5 Jan 2014 19:10:56 +0000 Subject: 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. --- libmandoc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libmandoc.h') 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 * Copyright (c) 2013 Ingo Schwarze @@ -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 *); -- cgit v1.2.3-56-ge451