summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-10-31 14:37:24 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-11-02 10:10:53 +1000
commitec6f334152badff475d2a8c465dfdbf740f148d0 (patch)
tree906cfbc71abfba7571d3820203a59c4bb627355e
parent7f8d7ecf0379ebc5386ee27f385a2ca564d6decb (diff)
Mark vsprintf_alloc as printf-like function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Eric Anholt <eric@anholt.net>
-rw-r--r--util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/util.c b/util.c
index 81c0489..5a23eeb 100644
--- a/util.c
+++ b/util.c
@@ -37,6 +37,7 @@ THE SOFTWARE.
#include FT_FREETYPE_H
#include FT_BDF_H
#include "X11/Xos.h"
+#include "X11/Xfuncproto.h" /* for _X_ATTRIBUTE_PRINTF */
#include "fonttosfnt.h"
#ifdef NEED_SNPRINTF
@@ -80,6 +81,7 @@ sprintf_alloc(const char *f, ...)
}
#if HAVE_VASPRINTF
+_X_ATTRIBUTE_PRINTF(1, 0)
char*
vsprintf_alloc(const char *f, va_list args)
{
@@ -92,6 +94,7 @@ vsprintf_alloc(const char *f, va_list args)
return r;
}
#else
+_X_ATTRIBUTE_PRINTF(1, 0)
char*
vsprintf_alloc(const char *f, va_list args)
{