From nobody Fri Jul 29 18:48:27 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 4Lvc3c33s6z4Y27n; Fri, 29 Jul 2022 18:48:28 +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 4Lvc3b4xDvz3slG; Fri, 29 Jul 2022 18:48:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120507; 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=uSzLL3dkkWC4uR4RqhCc31rDieDgjWuOr+nGd2iM0EM=; b=SS8Ip/00CS+ZVoH1164DuyjuUCe7ZO4FYt3V63v3jfCgVbITrqu8Ls4ARU0nRiRJ+7RAOS A/hvuC60JIuo/AV19tGEWpjDc3gBWYE82j2c3bAVxf0URUMgKTQ91lzYSlb0dZlVxYnFDK bHv/cm3hSKw7SZWlGBoZEkqcA4V0yQf+38Jv7d+kqWLXO2u7Ubr7bmfA0iVUQF/uY43923 JR/hDEaqaiPUdxzqkNQMagG/SwwrckGT59Y9PT+/vHyLs7T5AYzNeXEUh26ADAKgV986Ef tuxy1LaTafdydU6zcZu8ppXebXcQmf8OR+Yy0M66ulcc4ndTbdsl5ajyyCcNxQ== 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 4Lvc3b43MTzlkK; Fri, 29 Jul 2022 18:48: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 26TImRNT025400; Fri, 29 Jul 2022 18:48:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26TImRYE025399; Fri, 29 Jul 2022 18:48:27 GMT (envelope-from git) Date: Fri, 29 Jul 2022 18:48:27 GMT Message-Id: <202207291848.26TImRYE025399@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 356dccddae4d - stable/12 - 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/stable/12 X-Git-Reftype: branch X-Git-Commit: 356dccddae4d406dc83f5aeb109b75abb30d4d21 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120507; 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=uSzLL3dkkWC4uR4RqhCc31rDieDgjWuOr+nGd2iM0EM=; b=ec/KKrndgLnPsfkLSU1oz+k/JvXOgORnqfn9RkWoN+Dr9ndDbqIo4rJhDyQWiOPqFm+CON DH5D3ZPw5Gqy62dJWCqBbXAPl5iN+ZA+APiL6uaGqiXMiDGLg/UbMfMxAiDn6nN9P+kk5K Dd+zWLuBIzOUgvJ9B+UqVyzzUHWoP4pnDeBW8vZgdWIIp3lTgvire9Sc9RKqBbg2LSaRgd zX8bzARCgHua/fhaGL8oJUXOHi8VNzC/3DVUlDHyrqhDRXtPzXzcdk1sYExG9d5/EUl+qL rdDmBB1y0PLXvbgN+wVeD5bUFsGpZikbbTzm/9MZD/jNaPNnmkCGI0tnL3uXSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659120507; a=rsa-sha256; cv=none; b=f2+V1WxJhqVQ1uDBDQFEewBAWUYTJXTuLeFkGTedZikFPuw1VLSsEc/oonZBw5ipELPjGI mFRSPx+mRnx8ERAL0B42sISkP0za/w/qPUVbfiVtOyQI8+5EMF23x7hzKDybpAPQcE+kpY +EVNwU77cTgjmFne6gh50O+8Ha3YQ1mWj+rsXTrRP0GqKzcDVn/A83VFqUetbNZk0w9DHm tGARoGTGVxbQo9u6uPuUs127+OE+7YBGWQhKEXmWPZLB7GCDDNzDgy0qGdb7RufOPyU4qd b8LQ/LWzgpI6+7rWTJks7sanl21427DRovBgR4l1Su4o6BQ0R6GZ6PyTTWWf6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=356dccddae4d406dc83f5aeb109b75abb30d4d21 commit 356dccddae4d406dc83f5aeb109b75abb30d4d21 Author: Dimitry Andric AuthorDate: 2022-07-26 12:02:36 +0000 Commit: Dimitry Andric CommitDate: 2022-07-29 18:36:09 +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 (cherry picked from commit 39e12a7591bf2ed4b2fae48e19f3af3a3cdcb196) --- 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 b98ccb6e2595..2311bae3c605 100644 --- a/sys/dev/xen/blkback/blkback.c +++ b/sys/dev/xen/blkback/blkback.c @@ -1653,7 +1653,6 @@ 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; RING_IDX req_ring_idx; - u_int req_seg_idx; ring_req = nreq->ring_req; req_ring_idx = nreq->req_ring_idx; @@ -1661,7 +1660,6 @@ xbb_dispatch_io(struct xbb_softc *xbb, struct xbb_xen_reqlist *reqlist) 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. */ @@ -1715,7 +1713,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 */