]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
build: avoid frame size error when building without -O2
authorLaine Stump <laine@laine.org>
Mon, 26 Mar 2012 18:42:22 +0000 (14:42 -0400)
committerLaine Stump <laine@laine.org>
Mon, 26 Mar 2012 21:08:30 +0000 (17:08 -0400)
commitcf57d345b585c1e3914642b950f7041a7aeb853e
tree95f9254719d65e9bc6bcaff36630f5dd9cf91550
parentf0944525261b4aaed0fbfe6b0d7de622b2a935c7
build: avoid frame size error when building without -O2

libvirt always adds -Werror-frame-larger-than=4096 to the flags when
it builds. When building on Fedora 17, two functions with multiple
1024 buffers declared inside if {} blocks would generate frame size
errors; apparently the version of gcc on Fedora 16 will merge these
multiple buffers into a single buffer even when optimization is off,
but Fedora 17 won't.

The fix is to declare a single 1024 buffer at the top of the two
offending functions, and reuse the single buffer throughout the
functions.
src/libxl/libxl_driver.c
src/qemu/qemu_driver.c