mirror of
https://github.com/opnsense/src.git
synced 2026-04-21 06:07:31 -04:00
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 112cacaee4 got rid of
it. Remove the variable since it no longer serves any purpose.
MFC after: 3 days
This commit is contained in:
parent
e635220e1a
commit
39e12a7591
1 changed files with 0 additions and 3 deletions
|
|
@ -1558,14 +1558,12 @@ 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;
|
||||
u_int req_seg_idx;
|
||||
|
||||
ring_req = nreq->ring_req;
|
||||
nr_sects = 0;
|
||||
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. */
|
||||
|
|
@ -1619,7 +1617,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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue