git: 73505a10760c - main - vmm: fix "set but not used" warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 28 Feb 2022 23:50:33 UTC
The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=73505a10760c8b6f459b9c790bbf3a365f990a0b commit 73505a10760c8b6f459b9c790bbf3a365f990a0b Author: Robert Wing <rew@FreeBSD.org> AuthorDate: 2022-02-28 23:46:08 +0000 Commit: Robert Wing <rew@FreeBSD.org> CommitDate: 2022-02-28 23:46:08 +0000 vmm: fix "set but not used" warnings --- sys/amd64/vmm/vmm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index f0674784903f..7c4ea9f41bcc 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -854,7 +854,7 @@ static void vm_free_memmap(struct vm *vm, int ident) { struct mem_map *mm; - int error; + int error __diagused; mm = &vm->mem_maps[ident]; if (mm->len) { @@ -1827,7 +1827,7 @@ vm_restart_instruction(void *arg, int vcpuid) struct vcpu *vcpu; enum vcpu_state state; uint64_t rip; - int error; + int error __diagused; vm = arg; if (vcpuid < 0 || vcpuid >= vm->maxcpus) @@ -2066,7 +2066,7 @@ vm_inject_exception(struct vm *vm, int vcpuid, int vector, int errcode_valid, { struct vcpu *vcpu; uint64_t regval; - int error; + int error __diagused; if (vcpuid < 0 || vcpuid >= vm->maxcpus) return (EINVAL); @@ -2126,7 +2126,7 @@ vm_inject_fault(void *vmarg, int vcpuid, int vector, int errcode_valid, int errcode) { struct vm *vm; - int error, restart_instruction; + int error __diagused, restart_instruction; vm = vmarg; restart_instruction = 1; @@ -2140,7 +2140,7 @@ void vm_inject_pf(void *vmarg, int vcpuid, int error_code, uint64_t cr2) { struct vm *vm; - int error; + int error __diagused; vm = vmarg; VCPU_CTR2(vm, vcpuid, "Injecting page fault: error_code %#x, cr2 %#lx",