git: 39d87a023567 - main - vmm: fix "set but not used" warnings

From: Robert Wing <rew_at_FreeBSD.org>
Date: Mon, 28 Feb 2022 23:56:42 UTC
The branch main has been updated by rew:

URL: https://cgit.FreeBSD.org/src/commit/?id=39d87a023567f633c6990ac7fcc3a20691a1efd6

commit 39d87a023567f633c6990ac7fcc3a20691a1efd6
Author:     Robert Wing <rew@FreeBSD.org>
AuthorDate: 2022-02-28 23:55:37 +0000
Commit:     Robert Wing <rew@FreeBSD.org>
CommitDate: 2022-02-28 23:55:37 +0000

    vmm: fix "set but not used" warnings
---
 sys/amd64/vmm/intel/vmcs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/amd64/vmm/intel/vmcs.h b/sys/amd64/vmm/intel/vmcs.h
index 8aa7b1e8fc08..5c5214c65609 100644
--- a/sys/amd64/vmm/intel/vmcs.h
+++ b/sys/amd64/vmm/intel/vmcs.h
@@ -76,7 +76,7 @@ int	vmcs_snapshot_any(struct vmcs *vmcs, int running, int ident,
 static __inline uint64_t
 vmcs_read(uint32_t encoding)
 {
-	int error;
+	int error __diagused;
 	uint64_t val;
 
 	error = vmread(encoding, &val);
@@ -87,7 +87,7 @@ vmcs_read(uint32_t encoding)
 static __inline void
 vmcs_write(uint32_t encoding, uint64_t val)
 {
-	int error;
+	int error __diagused;
 
 	error = vmwrite(encoding, val);
 	KASSERT(error == 0, ("vmcs_write(%u) error %d", encoding, error));