mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
Fix unused variable warning in xen's blkfront.c
With clang 15, the following -Werror warning is produced:
sys/dev/xen/blkfront/blkfront.c:602:6: error: variable 'sbp' set but not used [-Werror,-Wunused-but-set-variable]
int sbp;
^
The 'sbp' variable was used in the for loop later in the xb_dump()
function, but refactoring in e4808c4b2d
got rid of it. Remove the
variable since it no longer serves any purpose.
MFC after: 3 days
This commit is contained in:
parent
57c46916e1
commit
e635220e1a
|
@ -599,7 +599,6 @@ xbd_dump(void *arg, void *virtual, off_t offset, size_t length)
|
|||
struct xbd_softc *sc = dp->d_drv1;
|
||||
struct xbd_command *cm;
|
||||
size_t chunk;
|
||||
int sbp;
|
||||
int rc = 0;
|
||||
|
||||
if (length == 0)
|
||||
|
@ -614,7 +613,7 @@ xbd_dump(void *arg, void *virtual, off_t offset, size_t length)
|
|||
mtx_lock(&sc->xbd_io_lock);
|
||||
|
||||
/* Split the 64KB block as needed */
|
||||
for (sbp=0; length > 0; sbp++) {
|
||||
while (length > 0) {
|
||||
cm = xbd_dequeue_cm(sc, XBD_Q_FREE);
|
||||
if (cm == NULL) {
|
||||
mtx_unlock(&sc->xbd_io_lock);
|
||||
|
|
Loading…
Reference in a new issue