diff --git a/include/linux/input-event-codes.h b/include/linux/input-event-codes.h index f5a8d96e..9771e4f8 100644 --- a/include/linux/input-event-codes.h +++ b/include/linux/input-event-codes.h @@ -756,7 +756,6 @@ #define ABS_MT_TOOL_X 0x3c /* Center X tool position */ #define ABS_MT_TOOL_Y 0x3d /* Center Y tool position */ - #define ABS_MAX 0x3f #define ABS_CNT (ABS_MAX+1) diff --git a/src/evdev-debounce.c b/src/evdev-debounce.c index c5677e51..6f53cdf8 100644 --- a/src/evdev-debounce.c +++ b/src/evdev-debounce.c @@ -34,7 +34,6 @@ 'filtered' .. event is not sent (but may be sent later) 'delayed' ... event is sent with wall-clock delay - 1) P---| R P normal, R normal 2) R---| P R normal, P normal 3) P---R--| P P normal, R filtered, delayed, P normal @@ -61,7 +60,6 @@ the second event). These cases are currently unhandled. */ - enum debounce_event { DEBOUNCE_EVENT_PRESS = 50, DEBOUNCE_EVENT_RELEASE, @@ -522,7 +520,6 @@ fallback_debounce_handle_state(struct fallback_dispatch *dispatch, flushed = false; } - dispatch->debounce.button_code = changed[i]; debounce_handle_event(dispatch, is_down ? @@ -574,7 +571,6 @@ fallback_init_debounce(struct fallback_dispatch *dispatch) return; } - dispatch->debounce.state = DEBOUNCE_STATE_IS_UP; snprintf(timer_name, diff --git a/src/evdev-fallback.c b/src/evdev-fallback.c index 269b3f5a..32184f8a 100644 --- a/src/evdev-fallback.c +++ b/src/evdev-fallback.c @@ -211,7 +211,6 @@ fallback_flush_wheels(struct fallback_dispatch *dispatch, if (!(device->seat_caps & EVDEV_DEVICE_POINTER)) return; - if (dispatch->wheel.y != 0) { wheel_degrees.y = -1 * dispatch->wheel.y * device->scroll.wheel_click_angle.y; @@ -830,7 +829,6 @@ fallback_handle_state(struct fallback_dispatch *dispatch, slot->state = SLOT_STATE_NONE; } - slot->dirty = false; } @@ -1153,7 +1151,6 @@ fallback_tablet_mode_switch_event(uint64_t time, LIBINPUT_SWITCH_TABLET_MODE) return; - switch (libinput_event_switch_get_switch_state(swev)) { case LIBINPUT_SWITCH_STATE_OFF: fallback_resume(dispatch, device); diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index bdc41a64..7b6825c0 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -182,7 +182,6 @@ tp_detect_wobbling(struct tp_dispatch *tp, if (dx > 0) { /* right move */ static const char r_l_r = 0x5; /* {Right, Left, Right} */ - t->hysteresis.x_motion_history |= (1 << 2); if (t->hysteresis.x_motion_history == r_l_r) { tp->hysteresis.enabled = true; diff --git a/src/evdev.c b/src/evdev.c index 1239a51d..309ec7d2 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1194,7 +1194,6 @@ evdev_get_trackpoint_range(struct evdev_device *device) "guessing... see %strackpoints.html\n", HTTP_DOC_LINK); - prop = udev_device_get_property_value(device->udev_device, "POINTINGSTICK_SENSITIVITY"); if (prop) { diff --git a/test/litest-device-ms-nano-transceiver-mouse.c b/test/litest-device-ms-nano-transceiver-mouse.c index dc534637..d481cb72 100644 --- a/test/litest-device-ms-nano-transceiver-mouse.c +++ b/test/litest-device-ms-nano-transceiver-mouse.c @@ -56,4 +56,3 @@ TEST_DEVICE("ms-nano-mouse", .absinfo = NULL, .events = events, ) - diff --git a/test/test-pad.c b/test/test-pad.c index eaa2bfaa..ca27f82a 100644 --- a/test/test-pad.c +++ b/test/test-pad.c @@ -320,7 +320,6 @@ START_TEST(pad_button_libwacom) LIBINPUT_BUTTON_STATE_RELEASED); } - libwacom_destroy(wacom); libwacom_database_destroy(db); #endif diff --git a/test/test-pointer.c b/test/test-pointer.c index 73717aa2..d6ff4ffe 100644 --- a/test/test-pointer.c +++ b/test/test-pointer.c @@ -2498,7 +2498,6 @@ START_TEST(debounce_spurious_switch_to_otherbutton) litest_timeout_debounce(); libinput_dispatch(li); - litest_event(dev, EV_KEY, BTN_LEFT, 0); litest_event(dev, EV_SYN, SYN_REPORT, 0); /* release is now held back, diff --git a/test/test-touchpad-tap.c b/test/test-touchpad-tap.c index b81decd1..88266782 100644 --- a/test/test-touchpad-tap.c +++ b/test/test-touchpad-tap.c @@ -2647,7 +2647,6 @@ START_TEST(touchpad_tap_palm_on_tapped) BTN_LEFT, LIBINPUT_BUTTON_STATE_RELEASED); - litest_assert_empty_queue(li); } END_TEST @@ -2689,7 +2688,6 @@ START_TEST(touchpad_tap_palm_on_tapped_palm_down) BTN_LEFT, LIBINPUT_BUTTON_STATE_RELEASED); - litest_assert_empty_queue(li); } END_TEST @@ -2741,7 +2739,6 @@ START_TEST(touchpad_tap_palm_on_tapped_2fg) BTN_LEFT, LIBINPUT_BUTTON_STATE_RELEASED); - litest_touch_up(dev, 0); litest_assert_empty_queue(li); } @@ -2862,7 +2859,6 @@ START_TEST(touchpad_tap_palm_on_touch_2) litest_drain_events(li); litest_touch_move_to_extended(dev, this, 50, 50, 50, 50, axes, 1, 1); - litest_touch_up(dev, this); litest_touch_up(dev, other); @@ -2875,7 +2871,6 @@ START_TEST(touchpad_tap_palm_on_touch_2) BTN_LEFT, LIBINPUT_BUTTON_STATE_RELEASED); - litest_assert_empty_queue(li); } END_TEST @@ -2892,7 +2887,6 @@ START_TEST(touchpad_tap_palm_on_touch_2_retouch) int this = which % 2, other = (which + 1) % 2; - if (!touchpad_has_palm_pressure(dev)) return; @@ -3076,7 +3070,6 @@ START_TEST(touchpad_tap_palm_after_tap) litest_enable_tap(dev->libinput_device); litest_drain_events(li); - litest_touch_down(dev, 0, 50, 50); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -3096,7 +3089,6 @@ START_TEST(touchpad_tap_palm_after_tap) BTN_LEFT, LIBINPUT_BUTTON_STATE_RELEASED); - litest_assert_empty_queue(li); } END_TEST diff --git a/tools/libinput-record.c b/tools/libinput-record.c index a71bdfe2..f31c7408 100644 --- a/tools/libinput-record.c +++ b/tools/libinput-record.c @@ -213,7 +213,6 @@ print_evdev_event(struct record_context *ctx, struct input_event *ev) static unsigned long last_ms = 0; unsigned long time, dt; - time = us2ms(tv2us(&ev->time)); if (last_ms == 0) last_ms = time; @@ -1020,7 +1019,6 @@ print_bits_absinfo(struct record_context *ctx, struct libevdev *dev) indent_pop(ctx); } - static inline void print_bits_codes(struct record_context *ctx, struct libevdev *dev, @@ -1528,7 +1526,6 @@ mainloop(struct record_context *ctx) sigprocmask(SIG_UNBLOCK, &mask, NULL); - return 0; } @@ -1769,7 +1766,6 @@ main(int argc, char **argv) goto out; } - devices = all_devices(); d = devices;