[Bug 207173] kvm compiling problem 5.6.x kvm_main.c:2236:42: error: ‘nr_pages_avail’ may be used uninitialized in this function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=207173

--- Comment #6 from Sean Christopherson (sean.j.christopherson@xxxxxxxxx) ---
Ah, fun.  So this falls into the "not technically a kernel problem" category. 
O3 isn't supported outside of the ARC architecture (no clue why it "needs" O3),
and AFAICT, has never been a selectable Kconfig option outside of ARC.

The false positives with -Wmaybe-uninitialized and -O3 (and -Os) is a known
issue, e.g. the kernel adds -Wno-maybe-uninitialized when compiling with either
of those options.  Unfortunately, there is no direct way to force
CONFIG_CC_DISABLE_WARN_MAYBE_UNINITIALIZED=y.  You could select
CONFIG_CC_OPTIMIZE_FOR_SIZE and then edit your Makefile, but I think that might
have unwanted side effects.

The easiest way to workaround this issue is to do CONFIG_KVM_WERROR=n.  The
false positive warning will still occur, but it won't get escalated to an error
and break your build.  I'm guessing there's a way to get
-Wno-maybe-uninitialized, but disabling -Werror for KVM is easy and doesn't
really have downsides.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux