Check arguments to wl_resource_post_error in gcc

The attached patch turns on printf argument warnings for this function,
which I found was being called incorrectly at least once in the wayland
source code.
This commit is contained in:
Bill Spitzak 2012-03-18 18:54:21 -07:00 committed by Kristian Høgsberg
parent ecfb79bd71
commit 81ffaa04b9

View file

@ -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"