From nobody Sun Apr 10 18:34:06 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 149E31A828F2; Sun, 10 Apr 2022 18:34:07 +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 4Kc0xp6ZPnz4j6Y; Sun, 10 Apr 2022 18:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649615647; 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=9mEYfZ+01IE5hJxPCTlsVqnTtT1JMosP6lsKO4pfOuc=; b=ypkOSQfp0oqT44s5Wx8U6AyYGud13bW/U+d30swraJBYAkmDdRHWbZ//n2mU4QMLkLu11H bTy/YGxXOTIBX+0MPbXIe/Be+43iyOIBmdM0TjeFAEKAXNZnQxjIcxZ+nTlUlq1BBHbU2A stKRL5d2XHqUujqScCHFj9GM4+RdqLR4fkdt9XOYHR955neysRFo1kFrzEM4fHX7a7T2pK 7ovPRMoAKH1jTc89O93AjbJ0aIzATUVmcPF8MylOWAEEMdSqJ4B+O05wFtSA5qEq3oCg94 R7b961mPd4Wl+EFuVuHODSCGFR08kR2eMOglcB7RGzBnmnqVxpbSl2MclV6T+A== 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 B495F13D3D; Sun, 10 Apr 2022 18:34:06 +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 23AIY6Xh074886; Sun, 10 Apr 2022 18:34:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23AIY6Wj074885; Sun, 10 Apr 2022 18:34:06 GMT (envelope-from git) Date: Sun, 10 Apr 2022 18:34:06 GMT Message-Id: <202204101834.23AIY6Wj074885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: f877977a034b - main - vmm: fix set but not used warnings 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: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f877977a034b41bedacdf507e79e4233b28a8bfc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649615647; 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=9mEYfZ+01IE5hJxPCTlsVqnTtT1JMosP6lsKO4pfOuc=; b=mrSMuRCyeKwGGY/IvWkqXn9lWOGHSHW6/Lr/gjtuACHfXY2xKjrBE7v2lqkEe0Ybk9M9Uq ebVy117IA4ePujp5BdCiFSp2wcW96E0Rj/pbegEF0FG8w1Q2w6wupHgi5ppEYhr1hrst1g fSCZ0ih1d1yEYdw7b2h1raXdut/sps0V0b8wmX/0/YdWx+q9NYi2qH9pSqfUtqqbHvd1wx /4UJud20mYXmJKtYDO5Z7fI4jerPjnU1HbRJAFSe2oERn9bTh/wluJpCy1vnP1rKE/jRGo VQZHDSuf1sF5/30s0NseKPe/NBFC9ji2fWDVekzUpANctf0VcUL9EyMdzs1f3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649615647; a=rsa-sha256; cv=none; b=DqYcNoC6d/JjlIGBygnr73vnLJhtcH2x4vn/ijWm6K9P9oCCKI5hgFnfepdPF+MC63qPzy eFh5tqpy/P0X2EHiI+ALWmvRl5MV8/ID+ewjg4w2yQ6gMDTySNKnDCzzcrh9a5SF1+7alV lSjpSMwhSfw21S7HgQJUyp2a6kZoTd1zzGVKPhgC/3JzK8iE56uOgmnCFkiaZQGCfyDWVT qkEO02MkPApkuStPeXCudaPITf8IJnYIyYkUVxMsSkgRioRpRwwle6ThE/OYPR0Nm1KG52 UWU0+OmokvmmuzsUYcO7sGC6llC3yX4uzThJdFoDqEbGiKt7HOCYnlsJSfyO0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=f877977a034b41bedacdf507e79e4233b28a8bfc commit f877977a034b41bedacdf507e79e4233b28a8bfc Author: Robert Wing AuthorDate: 2022-04-10 18:30:08 +0000 Commit: Robert Wing CommitDate: 2022-04-10 18:30:08 +0000 vmm: fix set but not used warnings --- sys/amd64/vmm/amd/svm.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c index fbf11ec84084..57e941fc6145 100644 --- a/sys/amd64/vmm/amd/svm.c +++ b/sys/amd64/vmm/amd/svm.c @@ -351,7 +351,7 @@ svm_msr_index(uint64_t msr, int *index, int *bit) static void svm_msr_perm(uint8_t *perm_bitmap, uint64_t msr, bool read, bool write) { - int index, bit, error; + int index, bit, error __diagused; error = svm_msr_index(msr, &index, &bit); KASSERT(error == 0, ("%s: invalid msr %#lx", __func__, msr)); @@ -654,7 +654,7 @@ svm_vcpu_mode(struct vmcb *vmcb) { struct vmcb_segment seg; struct vmcb_state *state; - int error; + int error __diagused; state = &vmcb->state; @@ -719,7 +719,7 @@ static void svm_inout_str_seginfo(struct svm_softc *svm_sc, int vcpu, int64_t info1, int in, struct vm_inout_str *vis) { - int error, s; + int error __diagused, s; if (in) { vis->seg_name = VM_REG_GUEST_ES; @@ -858,7 +858,7 @@ svm_handle_inst_emul(struct vmcb *vmcb, uint64_t gpa, struct vm_exit *vmexit) struct vmcb_segment seg; struct vmcb_ctrl *ctrl; char *inst_bytes; - int error, inst_len; + int error __diagused, inst_len; ctrl = &vmcb->ctrl; paging = &vmexit->u.inst_emul.paging; @@ -1113,7 +1113,7 @@ enable_nmi_blocking(struct svm_softc *sc, int vcpu) static void clear_nmi_blocking(struct svm_softc *sc, int vcpu) { - int error; + int error __diagused; KASSERT(nmi_blocked(sc, vcpu), ("vNMI already unblocked")); VCPU_CTR0(sc->vm, vcpu, "vNMI blocking cleared"); @@ -1146,7 +1146,7 @@ svm_write_efer(struct svm_softc *sc, int vcpu, uint64_t newval, bool *retu) struct vm_exit *vme; struct vmcb_state *state; uint64_t changed, lma, oldval; - int error; + int error __diagused; state = svm_get_vmcb_state(sc, vcpu); @@ -1328,7 +1328,7 @@ svm_vmexit(struct svm_softc *svm_sc, int vcpu, struct vm_exit *vmexit) struct svm_regctx *ctx; uint64_t code, info1, info2, val; uint32_t eax, ecx, edx; - int error, errcode_valid, handled, idtvec, reflect; + int error __diagused, errcode_valid, handled, idtvec, reflect; bool retu; ctx = svm_get_guest_regctx(svm_sc, vcpu); @@ -2554,7 +2554,6 @@ done: static int svm_vmcx_snapshot(void *arg, struct vm_snapshot_meta *meta, int vcpu) { - struct vmcb *vmcb; struct svm_softc *sc; int err, running, hostcpu; @@ -2562,7 +2561,6 @@ svm_vmcx_snapshot(void *arg, struct vm_snapshot_meta *meta, int vcpu) err = 0; KASSERT(arg != NULL, ("%s: arg was NULL", __func__)); - vmcb = svm_get_vmcb(sc, vcpu); running = vcpu_is_running(sc->vm, vcpu, &hostcpu); if (running && hostcpu !=curcpu) {