From: Laine Stump Date: Mon, 26 Mar 2012 16:39:03 +0000 (-0400) Subject: build: fix "missing initializer" error in qemu_process.c X-Git-Tag: v0.9.11-rc2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecb4d92d579413fc0aac867a59b5e777cbbe38e1;p=thirdparty%2Flibvirt.git build: fix "missing initializer" error in qemu_process.c Found when attempting to build on Fedora 17 alpha with: ./autogen.sh --system --enable-compile-warnings=error (this same build command works without problem on Fedora 16). Since the consumer of the qemuProcessReconnectData doesn't assume that the other fields of the struct are initialized (although it uses them internally), the simpler solution is to just switch to C99-style struct initialization (which doesn't require specification of all fields). --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index a68162ae88..060e091cbd 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3255,7 +3255,7 @@ error: void qemuProcessReconnectAll(virConnectPtr conn, struct qemud_driver *driver) { - struct qemuProcessReconnectData data = {conn, driver}; + struct qemuProcessReconnectData data = {.conn = conn, .driver = driver}; virHashForEach(driver->domains.objs, qemuProcessReconnectHelper, &data); }