[PATCH 3/5] GCC format arg checking for wl_resource_post_error

spitzak at gmail.com spitzak at gmail.com
Sun Mar 18 22:56:20 PDT 2012


From: Bill Spitzak <spitzak at lulu.(none)>

Probably a good idea, as the current code has a mistake here which
I fixed in the previous patch. May need to surround this so it is
gcc-only.
---
 src/wayland-server.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/wayland-server.h b/src/wayland-server.h
index 4293536..2072827 100644
--- a/src/wayland-server.h
+++ b/src/wayland-server.h
@@ -262,7 +262,8 @@ void wl_resource_queue_event(struct wl_resource *resource,
 
 /* msg is a printf format string, variable args are its args. */
 void wl_resource_post_error(struct wl_resource *resource,
-			    uint32_t code, const char *msg, ...);
+			    uint32_t code, const char *msg, ...)
+	__attribute__ ((format (printf, 3, 4)));
 void wl_resource_post_no_memory(struct wl_resource *resource);
 
 #include "wayland-server-protocol.h"
-- 
1.7.4.1



More information about the wayland-devel mailing list