git: 5241577a223d - main - vmm: fix set but not used warning

From: Robert Wing <rew_at_FreeBSD.org>
Date: Sun, 10 Apr 2022 18:34:10 UTC
The branch main has been updated by rew:

URL: https://cgit.FreeBSD.org/src/commit/?id=5241577a223d805282f726cb443a566aca653b9f

commit 5241577a223d805282f726cb443a566aca653b9f
Author:     Robert Wing <rew@FreeBSD.org>
AuthorDate: 2022-04-10 18:30:16 +0000
Commit:     Robert Wing <rew@FreeBSD.org>
CommitDate: 2022-04-10 18:30:16 +0000

    vmm: fix set but not used warning
---
 sys/amd64/vmm/vmm_instruction_emul.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/amd64/vmm/vmm_instruction_emul.c b/sys/amd64/vmm/vmm_instruction_emul.c
index ae022210893c..809fa16bce46 100644
--- a/sys/amd64/vmm/vmm_instruction_emul.c
+++ b/sys/amd64/vmm/vmm_instruction_emul.c
@@ -717,7 +717,7 @@ get_gla(void *vm, int vcpuid, struct vie *vie, struct vm_guest_paging *paging,
 {
 	struct seg_desc desc;
 	uint64_t cr0, val, rflags;
-	int error;
+	int error __diagused;
 
 	error = vie_read_register(vm, vcpuid, VM_REG_GUEST_CR0, &cr0);
 	KASSERT(error == 0, ("%s: error %d getting cr0", __func__, error));