From 263fafe819ee33c93ff7ac6ae3e22487ee873c94 Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Mon, 14 May 2018 13:51:54 +0800 Subject: [PATCH] HV: Initialize one variable to fix the compiling warning If the optimization option is enabled, it is possible that one variable is not initialized before using in the get_vioapic_info. (In fact the warning is bogus) This is only to reduce the compiling warning. Signed-off-by: Zhao Yakui --- hypervisor/arch/x86/guest/vioapic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hypervisor/arch/x86/guest/vioapic.c b/hypervisor/arch/x86/guest/vioapic.c index b7ed5bb1c..ee7744322 100644 --- a/hypervisor/arch/x86/guest/vioapic.c +++ b/hypervisor/arch/x86/guest/vioapic.c @@ -636,6 +636,7 @@ int get_vioapic_info(char *str, int str_max, int vmid) size -= len; str += len; + rte = 0; for (pin = 0 ; pin < vioapic_pincount(vm); pin++) { vioapic_get_rte(vm, pin, (void *)&rte); low = rte;