diff --git a/src/evdev-middle-button.c b/src/evdev-middle-button.c index a29a0943..98ac8872 100644 --- a/src/evdev-middle-button.c +++ b/src/evdev-middle-button.c @@ -612,7 +612,7 @@ evdev_middlebutton_filter_button(struct evdev_device *device, if (button < BTN_LEFT || bit >= sizeof(device->middlebutton.button_mask) * 8) { log_bug_libinput(device->base.seat->libinput, - "Button mask too small for %d\n", + "Button mask too small for %s\n", libevdev_event_code_get_name(EV_KEY, button)); return true; diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index b73138c8..35d0d853 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -1536,7 +1536,8 @@ tp_sanity_check(struct tp_dispatch *tp, error: log_bug_kernel(libinput, - "device %s failed touchpad sanity checks\n"); + "device %s failed touchpad sanity checks\n", + device->devname); return -1; } diff --git a/src/evdev.c b/src/evdev.c index dfd304e5..05d9b17d 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -563,7 +563,7 @@ evdev_process_touch(struct evdev_device *device, case ABS_MT_SLOT: if ((size_t)e->value >= device->mt.slots_len) { log_bug_libinput(device->base.seat->libinput, - "%s exceeds slots (%d of %d)\n", + "%s exceeds slots (%d of %zd)\n", device->devname, e->value, device->mt.slots_len); @@ -1482,6 +1482,7 @@ evdev_get_trackpoint_dpi(struct evdev_device *device) } log_info(libinput, "Device '%s' set to const accel %.2f\n", + device->devname, accel); } diff --git a/src/libinput-private.h b/src/libinput-private.h index d9dcffc8..927528b9 100644 --- a/src/libinput-private.h +++ b/src/libinput-private.h @@ -247,13 +247,15 @@ typedef void (*libinput_source_dispatch_t)(void *data); void log_msg(struct libinput *libinput, enum libinput_log_priority priority, - const char *format, ...); + const char *format, ...) + LIBINPUT_ATTRIBUTE_PRINTF(3, 4); void log_msg_va(struct libinput *libinput, enum libinput_log_priority priority, const char *format, - va_list args); + va_list args) + LIBINPUT_ATTRIBUTE_PRINTF(3, 0); int libinput_init(struct libinput *libinput,