Skip to content

Commit 354cb41

Browse files
Yi Wangbonzini
authored andcommitted
KVM: x86: fix empty-body warnings
We get the following warnings about empty statements when building with 'W=1': arch/x86/kvm/lapic.c:632:53: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] arch/x86/kvm/lapic.c:1907:42: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] arch/x86/kvm/lapic.c:1936:65: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] arch/x86/kvm/lapic.c:1975:44: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Rework the debug helper macro to get rid of these warnings. Signed-off-by: Yi Wang <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent f48b471 commit 354cb41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/lapic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#define PRIo64 "o"
5656

5757
/* #define apic_debug(fmt,arg...) printk(KERN_WARNING fmt,##arg) */
58-
#define apic_debug(fmt, arg...)
58+
#define apic_debug(fmt, arg...) do {} while (0)
5959

6060
/* 14 is the version for Xeon and Pentium 8.4.8*/
6161
#define APIC_VERSION (0x14UL | ((KVM_APIC_LVT_NUM - 1) << 16))

0 commit comments

Comments
 (0)