From 02fca305edb5762559df4c0ba0cd30d931a5fcc4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 10 May 2017 12:39:26 +1000 Subject: [PATCH] Fix va_start compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../src/libinput.c:56:17: warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Wvarargs] The enum's size is compiler-defined, so the enum gets promoted to whatever the compiler chose. That promotion is undefined, so let's use an int here. Signed-off-by: Peter Hutterer Reviewed-by: Armin Krezović Tested-by: Armin Krezović Reviewed-by: Eric Engestrom --- src/libinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libinput.c b/src/libinput.c index 472b1c0c..23255b07 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -46,7 +46,7 @@ static inline bool check_event_type(struct libinput *libinput, const char *function_name, - enum libinput_event_type type_in, + unsigned int type_in, ...) { bool rc = false;