From nobody Tue Jul 26 18:00:27 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Lsl7b69xQz4Wh9l; Tue, 26 Jul 2022 18:00:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lsl7b4q3kz3jkN; Tue, 26 Jul 2022 18:00:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658858427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qBTwXcXSdJdSWmlpzVWNS7zuvWCor+J83ndHfwlRwzk=; b=HuvIkh2hO0lqIo35r+EAQXiY2pVWEBDQEf4ospr5NZV/cVs6Qaq3bf4uWMTylQYxos25ow 3QtLutGjM12l9/ULQf/+fOZPfxcFL5Z8niHk9hcEs9wWYapeT5TLr5fzmtvv+J3udXxEnk OGw3SNKAkjbKkuvJKKNuVkfSyRMFLaHuC3CwMJMP5T86fryJ6sjCkAaJsVt8MgvEoexdZY JJoEuPHPQ1vPJehdQ7aBq8J9U6SGTwoyE2CN2XN9qRLwxUlwv3jXF60YXEYWVS3dWmeeqU vuzz6bd6ddWKoxX7wTEQGrzrb39kR9ET/6C8JFIQDh30LnghXE2QmaJ5tmEbnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Lsl7b3s67zm2P; Tue, 26 Jul 2022 18:00:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26QI0Rbk005743; Tue, 26 Jul 2022 18:00:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26QI0RJq005742; Tue, 26 Jul 2022 18:00:27 GMT (envelope-from git) Date: Tue, 26 Jul 2022 18:00:27 GMT Message-Id: <202207261800.26QI0RJq005742@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: e635220e1a33 - main - Fix unused variable warning in xen's blkfront.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e635220e1a330560ee547069054d81c4cf0b7839 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658858427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qBTwXcXSdJdSWmlpzVWNS7zuvWCor+J83ndHfwlRwzk=; b=kYGQsxCd4b4VJ5Ez7TcFM3y8K3oJJ3cvy3/lEsBjnjZGDptZHNnzMUDRGyQkpXQmHTcfEd 6zrTNlUoOYPbQLIzdOhdUIe6IuyTQlTPn1ljLsROvA+Jm+awEpb31vSUTf472ToCkR8YkJ gDaKISZK9MF/Y7XRTxQ7B4p6jXh6TZIu2Ur/gXmwBg1yLgFzDe17NWRJ4TfN8ETzUqERmO GUH9f6oRBodNCxBf+AXMwvUl9FrRx1aCSFb5fi+B5E9vrQBN5RioKBXxfFMocbGV13L84U tNDYR3Shw3vR+2mu+dv43eYaArJkDMptMVNDwLjnb8d9u9fbW0cFEudQHyH0Dw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658858427; a=rsa-sha256; cv=none; b=oVna2RN7WpqDrfECfMLMvFKfM28YD203UHRHpt2fWVhKqB/oRE317CWS5rA8SQv12UqLxu s1qgsxhkAnfBZ7Dq4auwNnQVBQPYMmMqw7RflxuVa21InDckJZfVS+aPKByMouEBnxLRPb zsT/y0TC6Cn2e2mJLgFQy+9ni6mDLsc/BH90R+zWwno5c0UmAKEZGOsr0YQRZTmRxLxEXU OdxQh/ohoeYaZ74ZCXUzPBYDaM9Jh3fKWePLPz9Oaj6Bf70zt34lSbgCwOPv9v7rz90/LX WIkA+mc7aHe3JMdicjmwT6anTr0KXoF8ekAcFJ/bbI8v9RBWiGTAFuNhDZXVRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e635220e1a330560ee547069054d81c4cf0b7839 commit e635220e1a330560ee547069054d81c4cf0b7839 Author: Dimitry Andric AuthorDate: 2022-07-26 12:01:26 +0000 Commit: Dimitry Andric CommitDate: 2022-07-26 17:59:55 +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 --- 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 9dc1252e5756..d6b2c0b68466 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, 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);