Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jul 2022 11:02:20 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 58b71ec7d630 - stable/12 - Fix unused variable warning in ocs_cam.c
Message-ID:  <202207241102.26OB2KdB041409@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by dim:

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

commit 58b71ec7d6307302dd22892bc7cf941fd7fc33fe
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-20 19:36:20 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-24 11:01:19 +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
    
    (cherry picked from commit 8d9e29284627f5e860b7fc194e9fedd6b21f7783)
---
 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 1b5c73f163ef..b83b9694bc15 100644
--- a/sys/dev/ocs_fc/ocs_cam.c
+++ b/sys/dev/ocs_fc/ocs_cam.c
@@ -2552,27 +2552,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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207241102.26OB2KdB041409>