From 25b14e13352aaa22591e6c6308826638783c159a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 22 Mar 2017 20:59:07 +1000 Subject: evdev: mark the new log functions as printf-style functions And fix up the one buggy call we had Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 3 +-- src/evdev.h | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 140fc6c..4a8b618 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -2395,8 +2395,7 @@ tp_init_pressure(struct tp_dispatch *tp, } evdev_log_debug(device, - "using pressure-based touch detection\n", - device->devname); + "using pressure-based touch detection\n"); } static int diff --git a/src/evdev.h b/src/evdev.h index 7790cf4..465b8a3 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -649,6 +649,7 @@ evdev_libinput_context(const struct evdev_device *device) return device->base.seat->libinput; } +LIBINPUT_ATTRIBUTE_PRINTF(3, 0) static inline void evdev_log_msg_va(struct evdev_device *device, enum libinput_log_priority priority, @@ -673,6 +674,7 @@ evdev_log_msg_va(struct evdev_device *device, args); } +LIBINPUT_ATTRIBUTE_PRINTF(3, 4) static inline void evdev_log_msg(struct evdev_device *device, enum libinput_log_priority priority, @@ -687,6 +689,7 @@ evdev_log_msg(struct evdev_device *device, } +LIBINPUT_ATTRIBUTE_PRINTF(4, 5) static inline void evdev_log_msg_ratelimit(struct evdev_device *device, struct ratelimit *ratelimit, -- cgit v1.2.3