vmm: fix set but not used warning

This commit is contained in:
Robert Wing 2022-04-10 10:30:16 -08:00
parent 3587bfa797
commit 5241577a22

View File

@ -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));