From: Peter Hutterer Date: Fri, 6 Jun 2014 05:56:50 +0000 (+1000) Subject: Mark the log function as attribute printf X-Git-Tag: 0.4.0~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7222f839d0008ad5bebc9ff25853bdcf14480c63;p=platform%2Fupstream%2Flibinput.git Mark the log function as attribute printf Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede --- diff --git a/src/libinput.h b/src/libinput.h index bc1dc23b..4b115637 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -31,6 +31,9 @@ extern "C" { #include #include +#define LIBINPUT_ATTRIBUTE_PRINTF(_format, _args) \ + __attribute__ ((format (printf, _format, _args))) + /** * @mainpage * libinput is a generic input device handling library. It abstracts @@ -999,7 +1002,8 @@ libinput_log_get_priority(void); */ typedef void (*libinput_log_handler)(enum libinput_log_priority priority, void *user_data, - const char *format, va_list args); + const char *format, va_list args) + LIBINPUT_ATTRIBUTE_PRINTF(3, 0); /** * @ingroup base