diff --git a/src/evdev.h b/src/evdev.h index b1d8f4dd..74696751 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -310,7 +310,6 @@ evdev_post_scroll(struct evdev_device *device, double dx, double dy); - void evdev_stop_scroll(struct evdev_device *device, uint64_t time, diff --git a/src/libinput-private.h b/src/libinput-private.h index ac8f9fbf..f6c4dccc 100644 --- a/src/libinput-private.h +++ b/src/libinput-private.h @@ -207,7 +207,6 @@ struct libinput_event_listener { typedef void (*libinput_source_dispatch_t)(void *data); - #define log_debug(li_, ...) log_msg((li_), LIBINPUT_LOG_PRIORITY_DEBUG, __VA_ARGS__) #define log_info(li_, ...) log_msg((li_), LIBINPUT_LOG_PRIORITY_INFO, __VA_ARGS__) #define log_error(li_, ...) log_msg((li_), LIBINPUT_LOG_PRIORITY_ERROR, __VA_ARGS__) diff --git a/src/libinput.c b/src/libinput.c index 3aa684a9..1abd1637 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -1912,7 +1912,6 @@ libinput_device_config_send_events_get_default_mode(struct libinput_device *devi return LIBINPUT_CONFIG_SEND_EVENTS_ENABLED; } - LIBINPUT_EXPORT int libinput_device_config_accel_is_available(struct libinput_device *device) { diff --git a/src/libinput.h b/src/libinput.h index 3cc041e2..2c454a7e 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -91,7 +91,6 @@ enum libinput_button_state { LIBINPUT_BUTTON_STATE_PRESSED = 1 }; - /** * @ingroup device * @@ -2783,7 +2782,6 @@ libinput_device_config_click_get_method(struct libinput_device *device); enum libinput_config_click_method libinput_device_config_click_get_default_method(struct libinput_device *device); - /** * @ingroup config * diff --git a/src/udev-seat.c b/src/udev-seat.c index 3d057336..6615f208 100644 --- a/src/udev-seat.c +++ b/src/udev-seat.c @@ -158,6 +158,8 @@ udev_input_add_devices(struct udev_input *input, struct udev *udev) udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(e)) { path = udev_list_entry_get_name(entry); device = udev_device_new_from_syspath(udev, path); + if (!device) + continue; sysname = udev_device_get_sysname(device); if (strncmp("event", sysname, 5) != 0) { diff --git a/test/device.c b/test/device.c index b7a23e69..a54c310f 100644 --- a/test/device.c +++ b/test/device.c @@ -189,7 +189,6 @@ START_TEST(device_disable_touchpad) litest_touch_move_to(dev, 0, 50, 50, 90, 90, 10, 0); litest_touch_up(dev, 0); - litest_assert_empty_queue(li); /* no event from resuming */ @@ -519,7 +518,6 @@ START_TEST(device_disable_release_tap_n_drag) } END_TEST - START_TEST(device_disable_release_softbutton) { struct litest_device *dev = litest_current_device(); diff --git a/test/keyboard.c b/test/keyboard.c index 4563ce6f..cb7ad522 100644 --- a/test/keyboard.c +++ b/test/keyboard.c @@ -36,7 +36,7 @@ START_TEST(keyboard_seat_key_count) struct libinput_event *ev; struct libinput_event_keyboard *kev; int i; - int seat_key_count; + int seat_key_count = 0; int expected_key_button_count = 0; char device_name[255]; diff --git a/test/litest.c b/test/litest.c index 199c0a17..05ed2b23 100644 --- a/test/litest.c +++ b/test/litest.c @@ -192,6 +192,7 @@ litest_add_tcase_for_device(struct suite *suite, } t = zalloc(sizeof(*t)); + assert(t != NULL); t->name = strdup(test_name); t->tc = tcase_create(test_name); list_insert(&suite->tests, &t->node); @@ -223,6 +224,7 @@ litest_add_tcase_no_device(struct suite *suite, void *func) } t = zalloc(sizeof(*t)); + assert(t != NULL); t->name = strdup(test_name); t->tc = tcase_create(test_name); list_insert(&suite->tests, &t->node); @@ -278,6 +280,7 @@ get_suite(const char *name) } s = zalloc(sizeof(*s)); + assert(s != NULL); s->name = strdup(name); s->suite = suite_create(s->name); @@ -816,7 +819,8 @@ litest_touch_down(struct litest_device *d, unsigned int slot, { struct input_event *ev; - assert(++d->ntouches_down > 0); + assert(d->ntouches_down >= 0); + d->ntouches_down++; send_btntool(d); @@ -844,7 +848,8 @@ litest_touch_up(struct litest_device *d, unsigned int slot) { .type = -1, .code = -1 } }; - assert(--d->ntouches_down >= 0); + assert(d->ntouches_down > 0); + d->ntouches_down--; send_btntool(d); diff --git a/test/pointer.c b/test/pointer.c index 2e52a206..24ea7266 100644 --- a/test/pointer.c +++ b/test/pointer.c @@ -470,7 +470,7 @@ START_TEST(pointer_seat_button_count) struct libinput_event *ev; struct libinput_event_pointer *tev; int i; - int seat_button_count; + int seat_button_count = 0; int expected_seat_button_count = 0; char device_name[255]; diff --git a/tools/event-gui.c b/tools/event-gui.c index 063624f3..f544b6f9 100644 --- a/tools/event-gui.c +++ b/tools/event-gui.c @@ -254,7 +254,6 @@ change_ptraccel(struct window *w, double amount) } } - static void handle_event_device_notify(struct libinput_event *ev) {