]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
* src/xml.c tests/sexpr2xmltest.c tests/xmconfigtest.c: avoid
authorDaniel Veillard <veillard@redhat.com>
Fri, 16 Mar 2007 14:55:51 +0000 (14:55 +0000)
committerDaniel Veillard <veillard@redhat.com>
Fri, 16 Mar 2007 14:55:51 +0000 (14:55 +0000)
  warnings when compiling without Xen
Daniel

ChangeLog
src/xml.c
tests/sexpr2xmltest.c
tests/xmconfigtest.c

index 7d3eb7500c9e7094775439f08ff8c67c524544b0..a137bad26f9a245b40ab461a60d742d32e542d1b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Mar 16 15:55:01 CET 2007 Daniel Veillard <veillard@redhat.com>
+
+       * src/xml.c tests/sexpr2xmltest.c tests/xmconfigtest.c: avoid
+         warnings when compiling without Xen
+
 Fri Mar 16 11:43:08 CET 2007 Daniel Veillard <veillard@redhat.com>
 
        * python/generator.py: patch from Tatsuro Enokura to fix 
index 09034d418ac63ad54c5c2faac83758041dc987ab..e3c4f165d4a12a7f58644defcae33a641df24fff 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -1384,6 +1384,10 @@ virDomainXMLDevID(virDomainPtr domain, char *xmldesc, char *class, char *ref)
                 free(xref);
                 goto cleanup;
             }
+#else /* without xen */
+            /* hack to avoid the warning that domain is unused */
+            if (domain->id < 0)
+               ret = -1;
 #endif /* WITH_XEN */
 
             goto error;
index 236ebd13a825f3c31516d649a58b45b4a6a8d5af..80403bddf5282052f6f1eaf2d77df17ef5ef7b86 100644 (file)
@@ -196,7 +196,7 @@ int
 main(void)
 {
     fprintf(stderr, "libvirt compiled without Xen support\n");
-    exit(0);
+    return(0);
 }
 #endif /* WITH_XEN */
 /*
index e5ef2b3cc15b6a9c449c57d48155f382f21ee4f8..90b432d960f45f7f0d48d56d42b3e469f99aa29f 100644 (file)
@@ -220,7 +220,7 @@ int
 main(void)
 {
     fprintf(stderr, "libvirt compiled without Xen support\n");
-    exit(0);
+    return(0);
 }
 #endif /* WITH_XEN */