]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: fix "missing initializer" error in qemu_process.c
authorLaine Stump <laine@laine.org>
Mon, 26 Mar 2012 16:39:03 +0000 (12:39 -0400)
committerLaine Stump <laine@laine.org>
Mon, 26 Mar 2012 21:08:30 +0000 (17:08 -0400)
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).

src/qemu/qemu_process.c

index a68162ae8804dabb51a496330cf4b0c0697fd3c7..060e091cbde6e8b8f5f7e20f6881657291c7223d 100644 (file)
@@ -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);
 }