The branch stable/12 has been updated by dim:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=5b8fed3056b17886395d8689399a6ea8350343d6

commit 5b8fed3056b17886395d8689399a6ea8350343d6
Author:     Dimitry Andric <[email protected]>
AuthorDate: 2022-07-26 12:01:26 +0000
Commit:     Dimitry Andric <[email protected]>
CommitDate: 2022-07-29 18:45:44 +0000

    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 e4808c4b2dba got rid of it. Remove the
    variable since it no longer serves any purpose.
    
    MFC after:      3 days
    
    (cherry picked from commit e635220e1a330560ee547069054d81c4cf0b7839)
---
 sys/dev/xen/blkfront/blkfront.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/blkfront.c
index 26f935199b99..1b17db8cdfe2 100644
--- a/sys/dev/xen/blkfront/blkfront.c
+++ b/sys/dev/xen/blkfront/blkfront.c
@@ -599,7 +599,6 @@ xbd_dump(void *arg, void *virtual, vm_offset_t physical, 
off_t offset,
        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, vm_offset_t physical, 
off_t offset,
        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);

Reply via email to