git: 4263f9186b4b - stable/13 - Fix unused variable warning in xen's blkback.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Jul 2022 18:47:20 UTC
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4263f9186b4b1095000507418c82a13375f913cc commit 4263f9186b4b1095000507418c82a13375f913cc Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-26 12:02:36 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-29 18:29:03 +0000 Fix unused variable warning in xen's blkback.c With clang 15, the following -Werror warning is produced: sys/dev/xen/blkback/blkback.c:1561:12: error: variable 'req_seg_idx' set but not used [-Werror,-Wunused-but-set-variable] u_int req_seg_idx; ^ The 'req_seg_idx' variable was used in the for loop later in the xbb_dispatch_io() function, but refactoring in 112cacaee408 got rid of it. Remove the variable since it no longer serves any purpose. MFC after: 3 days (cherry picked from commit 39e12a7591bf2ed4b2fae48e19f3af3a3cdcb196) --- sys/dev/xen/blkback/blkback.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/dev/xen/blkback/blkback.c b/sys/dev/xen/blkback/blkback.c index 010e737740b8..ca6670be0516 100644 --- a/sys/dev/xen/blkback/blkback.c +++ b/sys/dev/xen/blkback/blkback.c @@ -1646,7 +1646,6 @@ xbb_dispatch_io(struct xbb_softc *xbb, struct xbb_xen_reqlist *reqlist) STAILQ_FOREACH(nreq, &reqlist->contig_req_list, links) { blkif_request_t *ring_req; RING_IDX req_ring_idx; - u_int req_seg_idx; ring_req = nreq->ring_req; req_ring_idx = nreq->req_ring_idx; @@ -1654,7 +1653,6 @@ xbb_dispatch_io(struct xbb_softc *xbb, struct xbb_xen_reqlist *reqlist) nseg = ring_req->nr_segments; nreq->nr_pages = nseg; nreq->nr_512b_sectors = 0; - req_seg_idx = 0; sg = NULL; /* Check that number of segments is sane. */ @@ -1708,7 +1706,6 @@ xbb_dispatch_io(struct xbb_softc *xbb, struct xbb_xen_reqlist *reqlist) map++; xbb_sg++; seg_idx++; - req_seg_idx++; } /* Convert to the disk's sector size */