git: b621f3cf2d2c - main - Fix unused variable warning in usb's atp.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 26 Jul 2022 20:10:02 UTC
The branch main has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=b621f3cf2d2c30880c49afe37598e0f550afb181
commit b621f3cf2d2c30880c49afe37598e0f550afb181
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-26 19:46:02 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-26 20:08:07 +0000
Fix unused variable warning in usb's atp.c
With clang 15, the following -Werror warning is produced:
sys/dev/usb/input/atp.c:2018:11: error: variable 'n_vertical_scrolls' set but not used [-Werror,-Wunused-but-set-variable]
u_int8_t n_vertical_scrolls = 0;
^
The 'n_vertical_scrolls' variable is no longer used after 197b9a2ef003,
so remove it.
MFC after: 3 days
---
sys/dev/usb/input/atp.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sys/dev/usb/input/atp.c b/sys/dev/usb/input/atp.c
index 2f5487835c5e..206075694f92 100644
--- a/sys/dev/usb/input/atp.c
+++ b/sys/dev/usb/input/atp.c
@@ -2015,7 +2015,6 @@ atp_reap_sibling_zombies(void *arg)
u_int8_t n_touches_reaped = 0;
u_int8_t n_slides_reaped = 0;
u_int8_t n_horizontal_scrolls = 0;
- u_int8_t n_vertical_scrolls = 0;
int horizontal_scroll = 0;
atp_stroke_t *strokep;
atp_stroke_t *strokep_next;
@@ -2034,8 +2033,6 @@ atp_reap_sibling_zombies(void *arg)
if (atp_is_horizontal_scroll(strokep)) {
n_horizontal_scrolls++;
horizontal_scroll += strokep->cum_movement_x;
- } else if (atp_is_vertical_scroll(strokep)) {
- n_vertical_scrolls++;
}
}