]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
bhyve: fix bhyvexml2argvtest build with gcc
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Sat, 9 May 2015 15:10:50 +0000 (18:10 +0300)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Mon, 11 May 2015 17:08:47 +0000 (20:08 +0300)
gcc5 reports an error like this:

bhyvexml2argvtest.c: In function 'testCompareXMLToArgvFiles':
bhyvexml2argvtest.c:24:18: error: variable 'vm' set but not used
[-Werror=unused-but-set-variable]
     virDomainObj vm;
                  ^
cc1: all warnings being treated as errors

Fix by dropping this variable.

tests/bhyvexml2argvtest.c

index 1c7bc31a2d7e714f2b470c3c2b2872dd1a73e98a..fa6f87f8c68c675e07d1e49313baf96ba5098c48 100644 (file)
@@ -21,7 +21,6 @@ static int testCompareXMLToArgvFiles(const char *xml,
 {
     char *actualargv = NULL, *actualld = NULL, *actualdm = NULL;
     virDomainDefPtr vmdef = NULL;
-    virDomainObj vm;
     virCommandPtr cmd = NULL, ldcmd = NULL;
     virConnectPtr conn;
     int ret = -1;
@@ -33,7 +32,6 @@ static int testCompareXMLToArgvFiles(const char *xml,
                                         VIR_DOMAIN_DEF_PARSE_INACTIVE)))
         goto out;
 
-    vm.def = vmdef;
     conn->privateData = &driver;
 
     if (!(cmd = virBhyveProcessBuildBhyveCmd(conn, vmdef, false)))