aboutsummaryrefslogtreecommitdiffstats
path: root/vweprintf.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vweprintf.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/vweprintf.c b/vweprintf.c
index 9c93037..f684553 100644
--- a/vweprintf.c
+++ b/vweprintf.c
@@ -1,7 +1,11 @@
/* See LICENSE file for copyright and license details. */
-#include "libsimple.h"
+#include "common.h"
#ifndef TEST
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wformat-nonliteral"
+#endif
+
extern char *argv0;
@@ -32,8 +36,15 @@ libsimple_vweprintf(const char *fmt, va_list ap)
va_copy(ap2, ap);
r = vsnprintf(NULL, 0, fmt, ap1);
if (0 <= r && r < 8096) {
+#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Walloca"
+#endif
message = alloca((size_t)r + 1);
vsprintf(message, fmt, ap2);
+#if defined(__clang__)
+# pragma clang diagnostic pop
+#endif
}
va_end(ap2);
va_end(ap1);