git: d39a69e62809 - stable/12 - Fix unused variable warning in usb's atp.c

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Fri, 29 Jul 2022 18:48:48 UTC
The branch stable/12 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=d39a69e62809915744c4b0a0566ca3d3b0694bb0

commit d39a69e62809915744c4b0a0566ca3d3b0694bb0
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-26 19:46:02 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-29 18:45:06 +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
    
    (cherry picked from commit b621f3cf2d2c30880c49afe37598e0f550afb181)
---
 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 89ce10d21de5..9b296a9e8aa8 100644
--- a/sys/dev/usb/input/atp.c
+++ b/sys/dev/usb/input/atp.c
@@ -2014,7 +2014,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;
@@ -2033,8 +2032,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++;
 			}
 		}