[PATCH] clients/stacking: Silence a compiler warning

Armin Krezović krezovic.armin at gmail.com
Sat Sep 10 20:55:21 UTC 2016


clang doesn't support gnu_print attribute, so just
leave it out when clang is used.

Signed-off-by: Armin Krezović <krezovic.armin at gmail.com>
---
 clients/stacking.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/clients/stacking.c b/clients/stacking.c
index 4285a17..dd3d338 100644
--- a/clients/stacking.c
+++ b/clients/stacking.c
@@ -184,7 +184,11 @@ fullscreen_handler(struct window *window, void *data)
 
 static void
 draw_string(cairo_t *cr,
+#ifndef __clang__
             const char *fmt, ...) __attribute__((format (gnu_printf, 2, 3)));
+#else
+            const char *fmt, ...);
+#endif
 
 static void
 draw_string(cairo_t *cr,
-- 
2.10.0



More information about the wayland-devel mailing list