git: 8d9e29284627 - main - Fix unused variable warning in ocs_cam.c

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Thu, 21 Jul 2022 17:36:32 UTC
The branch main has been updated by dim:

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

commit 8d9e29284627f5e860b7fc194e9fedd6b21f7783
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-20 19:36:20 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-21 17:36:12 +0000

    Fix unused variable warning in ocs_cam.c
    
    With clang 15, the following -Werror warning is produced:
    
        sys/dev/ocs_fc/ocs_cam.c:2556:11: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable]
                uint32_t        count;
                                ^
    
    The 'count' variable seems to be a left-over from some debugging code
    that no longer exists, and can be removed without any functional change.
    
    MFC after:      3 days
---
 sys/dev/ocs_fc/ocs_cam.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/sys/dev/ocs_fc/ocs_cam.c b/sys/dev/ocs_fc/ocs_cam.c
index b734880cefb8..e2cbf3b1bf53 100644
--- a/sys/dev/ocs_fc/ocs_cam.c
+++ b/sys/dev/ocs_fc/ocs_cam.c
@@ -2553,27 +2553,22 @@ static int32_t
 ocs_tgt_resource_abort(struct ocs_softc *ocs, ocs_tgt_resource_t *trsrc)
 {
 	union ccb *ccb = NULL;
-	uint32_t	count;
 
-	count = 0;
 	do {
 		ccb = (union ccb *)STAILQ_FIRST(&trsrc->atio);
 		if (ccb) {
 			STAILQ_REMOVE_HEAD(&trsrc->atio, sim_links.stqe);
 			ccb->ccb_h.status = CAM_REQ_ABORTED;
 			xpt_done(ccb);
-			count++;
 		}
 	} while (ccb);
 
-	count = 0;
 	do {
 		ccb = (union ccb *)STAILQ_FIRST(&trsrc->inot);
 		if (ccb) {
 			STAILQ_REMOVE_HEAD(&trsrc->inot, sim_links.stqe);
 			ccb->ccb_h.status = CAM_REQ_ABORTED;
 			xpt_done(ccb);
-			count++;
 		}
 	} while (ccb);