From nobody Tue Jun 20 19:39:12 2023 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 4Qlxlj3f5Dz4gFqJ; Tue, 20 Jun 2023 19:39:13 +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 4Qlxlj1Z8hz44PF; Tue, 20 Jun 2023 19:39:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687289953; 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=VHwzwZTny2XNOgBAFCnyy6wxQurJn35u6Rq4a5feefE=; b=yINUq7lUiWIlqSeh0ID1847/5ybDFSW283Hgxyg0+pQJGsJwdpWrkV8CnBc5QQf/BJQHQR 4Kh/fThwiSQfHKJUOhb8hYFIy8BBfdwIwlUuFiGQgWOKVy8Hfb3E7vD7/4+vp2VElxPgJk 3Zgzek9Mjy04DyRp7N8M3Lu2fcC89rwO75vDHKlhQn1xJ14YIyV3aU5WGg0MvGu9Hz39Du biJBHX8gwMW1bolP0BExZR6zDUc732jkvOk5BiGrUtby9iIgVUoz8o17mOW12L1SnSOc8L hL2VTWZa5teuXXEcxAeAfTlj8kXejH21uAXXcbCEdYzj5Oe0OpDiGUFt/XdrSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687289953; 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=VHwzwZTny2XNOgBAFCnyy6wxQurJn35u6Rq4a5feefE=; b=SWVdgReRVhDMKRDk3nr3Lp7StuZBINVZCp+9gAYhfD5fkqmRcxacC4EOjv8/1GaDTbCqQ/ 8K9uRQPDKFCmJVIsO+MJ+jK7tsR/FNsMieB4kRAbU7LUOtlggJYTJraXpEV3TruNMpym2/ Y8p/V/1c+CWy1GDBa1m5/FWt78wXihXOtq+I040ORNApwX8JaYESQPedeK739DFSJJbQGX WE4u1ZkNxpMO2n2ZPDCrUTngEqe64AKd2DhzKmuiNlNflgtTgZ5wOpYJYoP9UoKEP5IT1v +MF0ZM7lRv/IUWPzcT8CVvhRTyM+Wlv34L3O5q38MmoWj/bwXGxljcoC52QWoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687289953; a=rsa-sha256; cv=none; b=SJRCTdasXr36T916vm1qFgXdCvECy4FutL9jdt5a9TaQ3uG6XtNTNqjD5sJobUh0321ARf UPdrUJuLoWMqshLY/iFI5vSsv7aBZBprC4HWuw/MM/TVUhHLPObXL43+ldDnmBPBklCrTn 9b42ZOXuKM0y25NI78eZWBl+/fjCMkeriSFmqxA2ET260YzRER0WT/30CBKWct0Dhzu15O +AFwT5wY3Iu4RKoNbuq4ozwg0m7YU+U0QYNszq/R9BEXy1fxZyFbvHLL2y+MQrePo0uq4Y +M09mEpIs7L8XfZKqFt7zuHaqYwmfwtCmgOoQVohF/0UmAri6yBSgmt6tcGk2Q== 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 4Qlxlj0gpwz1BdD; Tue, 20 Jun 2023 19:39:13 +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 35KJdDw5058370; Tue, 20 Jun 2023 19:39:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35KJdC4n058369; Tue, 20 Jun 2023 19:39:12 GMT (envelope-from git) Date: Tue, 20 Jun 2023 19:39:12 GMT Message-Id: <202306201939.35KJdC4n058369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 52642de03bb1 - main - camdd: Remove set but unused variables. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52642de03bb11f0356ff085c01cedc3ac38e7476 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=52642de03bb11f0356ff085c01cedc3ac38e7476 commit 52642de03bb11f0356ff085c01cedc3ac38e7476 Author: John Baldwin AuthorDate: 2023-06-20 19:32:57 +0000 Commit: John Baldwin CommitDate: 2023-06-20 19:32:57 +0000 camdd: Remove set but unused variables. Reported by: GCC Reviewed by: ken Differential Revision: https://reviews.freebsd.org/D40655 --- usr.sbin/camdd/camdd.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/usr.sbin/camdd/camdd.c b/usr.sbin/camdd/camdd.c index caf06ba9a596..f6c4baff763c 100644 --- a/usr.sbin/camdd/camdd.c +++ b/usr.sbin/camdd/camdd.c @@ -2748,12 +2748,9 @@ bailout: int camdd_get_next_lba_len(struct camdd_dev *dev, uint64_t *lba, ssize_t *len) { - struct camdd_dev_pass *pass_dev; uint32_t num_blocks; int retval = 0; - pass_dev = &dev->dev_spec.pass; - *lba = dev->next_io_pos_bytes / dev->sector_size; *len = dev->blocksize; num_blocks = *len / dev->sector_size; @@ -2810,15 +2807,11 @@ camdd_queue(struct camdd_dev *dev, struct camdd_buf *read_buf) { struct camdd_buf *buf = NULL; struct camdd_buf_data *data; - struct camdd_dev_pass *pass_dev; size_t new_len; struct camdd_buf_data *rb_data; int is_write = dev->write_dev; int eof_flush_needed = 0; int retval = 0; - int error; - - pass_dev = &dev->dev_spec.pass; /* * If we've gotten EOF or our partner has, we should not continue @@ -2839,7 +2832,7 @@ camdd_queue(struct camdd_dev *dev, struct camdd_buf *read_buf) if (is_write) { read_buf->status = CAMDD_STATUS_EOF; - error = camdd_complete_peer_buf(dev, read_buf); + camdd_complete_peer_buf(dev, read_buf); } goto bailout; } @@ -2908,7 +2901,7 @@ camdd_queue(struct camdd_dev *dev, struct camdd_buf *read_buf) if (len == 0) { dev->flags |= CAMDD_DEV_FLAG_EOF; - error = camdd_complete_peer_buf(dev, read_buf); + camdd_complete_peer_buf(dev, read_buf); goto bailout; } }