git: 770520da5815 - stable/13 - Fix unused variable warning in ocs_cam.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 24 Jul 2022 11:01:44 UTC
The branch stable/13 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=770520da5815aa056f72696cb48187f332d314d8
commit 770520da5815aa056f72696cb48187f332d314d8
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:00:07 +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 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);