Skip to contentSkip to conversation

"KVM: x86: enable -Werror" breaks W=1 compilation

DISCUSSION Qian Cai 2 participants 2 messages Feb 13, 2020 KVM

lore
Share & tools
lore

Qian Cai

author
#0 lore raw

People have been running W=1 to catch additional compilation warnings with an expectation that not all of warnings will be fixed, but the linux-next commit ead68df94d24 ("KVM: x86: enable -Werror") breaks the build for them.

arch/x86/kvm/../../../virt/kvm/kvm_main.c:663:12: error: no previous prototype for ‘kvm_arch_post_init_vm’ [-Werror=missing-prototypes]
 int __weak kvm_arch_post_init_vm(struct kvm *kvm) ^~~~~~~~~~~~~~~~~~~~~ arch/x86/kvm/../../../virt/kvm/kvm_main.c:672:13: error: no previous prototype for ‘kvm_arch_pre_destroy_vm’ [-Werror=missing-prototypes]
 void __weak kvm_arch_pre_destroy_vm(struct kvm *kvm)

maintainer
#1 lore raw
Quoted 11 lines · Qian Cai

People have been running W=1 to catch additional compilation warnings with an expectation that not all of warnings will be fixed, but the linux-next commit ead68df94d24 ("KVM: x86: enable -Werror") breaks the build for them.

arch/x86/kvm/../../../virt/kvm/kvm_main.c:663:12: error: no previous prototype for ‘kvm_arch_post_init_vm’ [-Werror=missing-prototypes]
 int __weak kvm_arch_post_init_vm(struct kvm *kvm) ^~~~~~~~~~~~~~~~~~~~~ arch/x86/kvm/../../../virt/kvm/kvm_main.c:672:13: error: no previous prototype for ‘kvm_arch_pre_destroy_vm’ [-Werror=missing-prototypes]
 void __weak kvm_arch_pre_destroy_vm(struct kvm *kvm)

Thanks, we already found two bugs, one of them real (it's from -Wtype-limits). But I'll leave out this commit for now from the pull request, of course.

Paolo