]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
libxl/dm_depriv: Fix non-debug build
authorGeorge Dunlap <george.dunlap@citrix.com>
Sat, 22 Dec 2018 08:59:48 +0000 (08:59 +0000)
committerGeorge Dunlap <george.dunlap@citrix.com>
Sat, 22 Dec 2018 08:59:48 +0000 (08:59 +0000)
Apparently older versions of gcc, when building with debug=n, the
uninitialized variable logic gets confused.  Distros on which a
non-debug build will fail include:
- Centos 7
- Debian Jessie
- Ubuntu Trusty

It seems to be one particular path confusing the logic; so just set it
on that path to keep the compiler happy, while still catching other
potential paths where it might be unset.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
tools/libxl/libxl_dm.c

index 4b97936bd5930b89183584933465c0b3313bd4b3..be493cf9f2060ede3d7d3b69d3fd2f0fe766e694 100644 (file)
@@ -177,6 +177,7 @@ static int libxl__domain_get_device_model_uid(libxl__gc *gc,
         LOGD(DEBUG, guest_domid,
              "dm_restrict disabled, starting QEMU as root");
         user = NULL; /* Should already be null, but just in case */
+        kill_by_uid = false; /* Keep older versions of gcc happy */
         rc = 0;
         goto out;
     }