The cast is just to prevent fallouts due to the Werror. The error and rax are really unsigned values, but int to unsigned promotion is mixed too many times to be easily fixed.
Signed-off-by: Andrea Bastoni <[email protected]> --- hypervisor/arch/x86/control.c | 2 +- hypervisor/arch/x86/vcpu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hypervisor/arch/x86/control.c b/hypervisor/arch/x86/control.c index 2aea807a..98659f4a 100644 --- a/hypervisor/arch/x86/control.c +++ b/hypervisor/arch/x86/control.c @@ -238,7 +238,7 @@ x86_exception_handler(struct exception_frame *frame) { panic_printk("FATAL: Jailhouse triggered exception #%lld\n", frame->vector); - if (frame->error != -1) + if ((int)frame->error != -1) panic_printk("Error code: %llx\n", frame->error); panic_printk("Physical CPU ID: %lu\n", phys_processor_id()); panic_printk("RIP: 0x%016llx RSP: 0x%016llx FLAGS: %llx\n", frame->rip, diff --git a/hypervisor/arch/x86/vcpu.c b/hypervisor/arch/x86/vcpu.c index 7a6543bf..5dd23d49 100644 --- a/hypervisor/arch/x86/vcpu.c +++ b/hypervisor/arch/x86/vcpu.c @@ -194,7 +194,7 @@ void vcpu_handle_hypercall(void) guest_regs->rax = hypercall(code, guest_regs->rdi & arg_mask, guest_regs->rsi & arg_mask); - if (guest_regs->rax == -ENOSYS) + if ((int)guest_regs->rax == -ENOSYS) printk("CPU %d: Unknown hypercall %ld, RIP: 0x%016llx\n", cpu_id, code, vcpu_vendor_get_rip() - X86_INST_LEN_HYPERCALL); -- 2.28.0 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/20201021145404.100463-24-andrea.bastoni%40tum.de.
