From nobody Tue Jul 26 18:00:28 2022 X-Original-To: dev-commits-src-all@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 4Lsl7d2Z8Qz4XgNt; Tue, 26 Jul 2022 18:00:29 +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 4Lsl7c5sRwz3jsj; Tue, 26 Jul 2022 18:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658858428; 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=DJrcRazR2TIlP64ayf4kcKmADmlmclfELbipmUM9/Vk=; b=et6IkntzeBJ5F0hOUUSmi6Q1VHFibYpaKJDN2OGBX1q3G+0NTZCgKqf/ArAc2h3Y8P1jkx wmN2WzjDWWB+0O4+3tz+SNRidgYKitvuv1bELKa51yjQhlER5tSFS+lc3TeUT3e5Qx+jnK t9yx1U9pdVM40Xhrp2fZBjDBEOvQClDyTPMCLbzPG0BO2zDOXgwhP9RavnbCBzd2M5NwDv hVBTV7Ps+uWJBtYpSGFhSNG6QZ5ZqNMFgs7clbT/BbMfy1ypMt7EuCmjhDWWUDuqvvO8Q0 /jt4rC+FHZ7j8QqJVjtv55Qx0wvkJ5lMurlxQrekRmyC63AOAZ7FvSlIwki46A== 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 4Lsl7c4yh1zmBB; Tue, 26 Jul 2022 18:00:28 +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 26QI0SSZ005768; Tue, 26 Jul 2022 18:00:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26QI0SAv005766; Tue, 26 Jul 2022 18:00:28 GMT (envelope-from git) Date: Tue, 26 Jul 2022 18:00:28 GMT Message-Id: <202207261800.26QI0SAv005766@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: 39e12a7591bf - main - Fix unused variable warning in xen's blkback.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 39e12a7591bf2ed4b2fae48e19f3af3a3cdcb196 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658858428; 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=DJrcRazR2TIlP64ayf4kcKmADmlmclfELbipmUM9/Vk=; b=DTU1cwEXVpJnRRjaatcd1GRQleAZGOywQvc1nANgrkheEc78qhl4WKM66eDlG+sjw+z6V9 Fr/sA+LRfpCfx9q/Fw2E6h0hH9ZOkcFpDy3ZleuKt9+QABmh+HzZOpCJ9BIszowjq80Ibf A1SF1DZFIETqp0USXhy7y2OFE2R1DOeiN6rFy9Bw1d833G+z6lIHLVjUn8xt6tpNTDJw2E W0nSk1bH/V4/dTZYcsocO0xFOOiJdMnlZeEozMcM1ZNQM6nZlCThdCiu2D/5NvFtu3fh3j PWDcIVMptoN2yR1hjJ0PuzRPocdN/qDG2IOP4kkFQCjsybpMiwl+v8mu7N5LEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658858428; a=rsa-sha256; cv=none; b=IwsYg3A6+2SdeEAWyCTlZtAzRL+dyN53eCfjuHaPLWlTWNB6rbPxw96AKVHNev1AsfxPx4 zqnZo2r/3SEDG776Zq5OQHkMTjZAGqgx5eGupB1HlphpNCWsxqgptlnhZB7afAiJNkCB43 l/8DADa0bK7MhWMFdXmhuvJfQSeQf9WsLWcdHYb/JiA8woC3iQhl3bjXn2jXPUqH5Ib0nc mUijVHOcl2PtuvAUQmyfrqYCj3W2ihlUenFwdF+hSlyxxQoZoyrb9CprP5UkhN9j7pftPf LacMka6ph8DoG5T4sfq425gO+DSayCeQf6fnHZp9oYAjigI4K/JF2BY7Qn5g2A== 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=39e12a7591bf2ed4b2fae48e19f3af3a3cdcb196 commit 39e12a7591bf2ed4b2fae48e19f3af3a3cdcb196 Author: Dimitry Andric AuthorDate: 2022-07-26 12:02:36 +0000 Commit: Dimitry Andric CommitDate: 2022-07-26 17:59:55 +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 --- 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 bd550695e719..6a5f9631004e 100644 --- a/sys/dev/xen/blkback/blkback.c +++ b/sys/dev/xen/blkback/blkback.c @@ -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 */