From nobody Thu Nov 25 03:20:24 2021 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 89A3818AB53C; Thu, 25 Nov 2021 03:20:25 +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 4J036K1QHlz3vnP; Thu, 25 Nov 2021 03:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 065DD161E9; Thu, 25 Nov 2021 03:20:25 +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 1AP3KOsI098967; Thu, 25 Nov 2021 03:20:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP3KOJC098966; Thu, 25 Nov 2021 03:20:24 GMT (envelope-from git) Date: Thu, 25 Nov 2021 03:20:24 GMT Message-Id: <202111250320.1AP3KOJC098966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Scott Long Subject: git: c154feacc4f2 - main - Fix "set but not used" warnings in CAM. 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: scottl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c154feacc4f2e1dc0858eb93eb1994ea997e699b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637810425; 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=4zMnTfjaDMhlhgaDTIzxdT7GyfuLJf/Pp922SzFMx5Q=; b=fVuHe1JIdhC1Ph6wnabUGyHuMiaiQBE2DJeKcs57FMYdo0v4O+/GN8ZdJG6+wOAz1E0TqP FWtMwYxqAMu2ZFVd2GkrMIyaW4zPC+xPblXOEQKdzenw4eysuK7ql3QZBhvjfPTMZIkI9u t1z6ncvi5ED+cDTHozxN+lwp7bn6yBcnQvlGXNh7/++DzDiGSMZ3o6sRnYOQ2YOdteakJ5 evAXHwo1PjfHhCQs+1b4UceOluHkJySgOUDPLz+33jcDAEmO4OhqtxsTGUmDZYG4mUnx3w jQzbQGwnqZR0Q5YMPbkFTV9I21MY2aALYx+TYsDZCH46R63RFNLaCj9pNWRjYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637810425; a=rsa-sha256; cv=none; b=yVhIS+AGIBpHZx67mMwr0f/iCoICF/VQAfDDz6xBxlVVOCfVRvlqVlUh7p4UmmhbxBQ2e/ jlOrYeA7eS3ZY0hkrJtns/X3jt3611dtXehPngh3OWO0gjNYZ8pNnw6FA4huO8B2e8LT6n Wp6dhcb62W09c5X8kSEME7T6aYtwqTqjo4TiPYFQLMOwbVMTrGxCi+Ixg89eBSDeY6QU1n 2UftAzwJZlZ/e5k07M2T09SZJCNBu7QSAyhtxUYLu0HveljYRB+2S+GODnZ36kyA9VL55P QoiE9yUYRWIVmN2oF/xIKzteCiwK/qJzQjZZ5DZjmAcvNYQImElqmlciWwU2Eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by scottl: URL: https://cgit.FreeBSD.org/src/commit/?id=c154feacc4f2e1dc0858eb93eb1994ea997e699b commit c154feacc4f2e1dc0858eb93eb1994ea997e699b Author: Scott Long AuthorDate: 2021-11-25 03:17:54 +0000 Commit: Scott Long CommitDate: 2021-11-25 03:17:54 +0000 Fix "set but not used" warnings in CAM. --- sys/cam/cam_sim.c | 2 +- sys/cam/scsi/scsi_da.c | 2 +- sys/cam/scsi/scsi_pt.c | 5 ----- sys/cam/scsi/scsi_sg.c | 7 ------- sys/cam/scsi/scsi_target.c | 2 -- 5 files changed, 2 insertions(+), 16 deletions(-) diff --git a/sys/cam/cam_sim.c b/sys/cam/cam_sim.c index abf65965fc8e..2dbf581712f1 100644 --- a/sys/cam/cam_sim.c +++ b/sys/cam/cam_sim.c @@ -144,7 +144,7 @@ void cam_sim_free(struct cam_sim *sim, int free_devq) { struct mtx *mtx; - int error; + int error __diagused; if (sim->mtx == NULL) { mtx = &cam_sim_free_mtx; diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 83e14eca35ab..0bcbccc7eab9 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -5921,7 +5921,7 @@ static void dareprobe(struct cam_periph *periph) { struct da_softc *softc; - int status; + int status __diagused; softc = (struct da_softc *)periph->softc; diff --git a/sys/cam/scsi/scsi_pt.c b/sys/cam/scsi/scsi_pt.c index 4e7ce9566c59..515bfc4b0aba 100644 --- a/sys/cam/scsi/scsi_pt.c +++ b/sys/cam/scsi/scsi_pt.c @@ -560,11 +560,6 @@ ptdone(struct cam_periph *periph, union ccb *done_ccb) static int pterror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) { - struct pt_softc *softc; - struct cam_periph *periph; - - periph = xpt_path_periph(ccb->ccb_h.path); - softc = (struct pt_softc *)periph->softc; return(cam_periph_error(ccb, cam_flags, sense_flags)); } diff --git a/sys/cam/scsi/scsi_sg.c b/sys/cam/scsi/scsi_sg.c index c2be014b118b..c0b2328b0c80 100644 --- a/sys/cam/scsi/scsi_sg.c +++ b/sys/cam/scsi/scsi_sg.c @@ -405,7 +405,6 @@ sgdone(struct cam_periph *periph, union ccb *done_ccb) case SG_CCB_RDWR_IO: { struct sg_rdwr *rdwr; - int state; devstat_end_transaction(softc->device_stats, csio->dxfer_len, @@ -417,7 +416,6 @@ sgdone(struct cam_periph *periph, union ccb *done_ccb) NULL, NULL); rdwr = done_ccb->ccb_h.ccb_rdwr; - state = rdwr->state; rdwr->state = SG_RDWR_DONE; wakeup(rdwr); break; @@ -932,11 +930,6 @@ sgsendrdwr(struct cam_periph *periph, union ccb *ccb) static int sgerror(union ccb *ccb, uint32_t cam_flags, uint32_t sense_flags) { - struct cam_periph *periph; - struct sg_softc *softc; - - periph = xpt_path_periph(ccb->ccb_h.path); - softc = (struct sg_softc *)periph->softc; return (cam_periph_error(ccb, cam_flags, sense_flags)); } diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index b743fa2fe9ca..8640067cc531 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -761,13 +761,11 @@ static void targdone(struct cam_periph *periph, union ccb *done_ccb) { struct targ_softc *softc; - cam_status status; CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, ("targdone %p\n", done_ccb)); softc = (struct targ_softc *)periph->softc; TAILQ_REMOVE(&softc->pending_ccb_queue, &done_ccb->ccb_h, periph_links.tqe); - status = done_ccb->ccb_h.status & CAM_STATUS_MASK; /* If we're no longer enabled, throw away CCB */ if ((softc->state & TARG_STATE_LUN_ENABLED) == 0) {