[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] PATCH: Fix misc compile warnings



Enabling a bunch of non-default configure options shows some compiler
warnings. This patch fixes them

Daniel

Index: src/lxc_driver.c
===================================================================
RCS file: /data/cvs/libvirt/src/lxc_driver.c,v
retrieving revision 1.11
diff -u -p -r1.11 lxc_driver.c
--- src/lxc_driver.c	9 Jun 2008 22:51:32 -0000	1.11
+++ src/lxc_driver.c	12 Jun 2008 11:19:09 -0000
@@ -1202,6 +1202,8 @@ static virDriver lxcDriver = {
     NULL, /* domainMigrateFinish */
     NULL, /* domainBlockStats */
     NULL, /* domainInterfaceStats */
+    NULL, /* domainBlockPeek */
+    NULL, /* domainMemoryPeek */
     NULL, /* nodeGetCellsFreeMemory */
     NULL, /* getFreeMemory */
 };
Index: src/openvz_conf.c
===================================================================
RCS file: /data/cvs/libvirt/src/openvz_conf.c,v
retrieving revision 1.24
diff -u -p -r1.24 openvz_conf.c
--- src/openvz_conf.c	6 Jun 2008 11:09:57 -0000	1.24
+++ src/openvz_conf.c	12 Jun 2008 11:19:09 -0000
@@ -41,13 +41,14 @@
 #include <unistd.h>
 #include <limits.h>
 #include <errno.h>
+#include <string.h>
 
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxml/xpath.h>
 #include <libxml/uri.h>
 
-#include "libvirt/virterror.h"
+#include "internal.h"
 
 #include "openvz_driver.h"
 #include "openvz_conf.h"
@@ -55,8 +56,6 @@
 #include "buf.h"
 #include "memory.h"
 
-#include <string.h>
-
 static char *openvzLocateConfDir(void);
 static void error (virConnectPtr conn, virErrorNumber code, const char *info);
 static struct openvz_vm_def *openvzParseXML(virConnectPtr conn, xmlDocPtr xml);
Index: src/openvz_driver.c
===================================================================
RCS file: /data/cvs/libvirt/src/openvz_driver.c,v
retrieving revision 1.21
diff -u -p -r1.21 openvz_driver.c
--- src/openvz_driver.c	6 Jun 2008 11:09:57 -0000	1.21
+++ src/openvz_driver.c	12 Jun 2008 11:19:09 -0000
@@ -761,6 +761,8 @@ static virDriver openvzDriver = {
     NULL, /* domainMigrateFinish */
     NULL, /* domainBlockStats */
     NULL, /* domainInterfaceStats */
+    NULL, /* domainBlockPeek */
+    NULL, /* domainMemoryPeek */
     NULL, /* nodeGetCellsFreeMemory */
     NULL, /* nodeGetFreeMemory */
 };
@@ -770,6 +772,7 @@ static virStateDriver openvzStateDriver 
     openvzShutdown,
     openvzReload,
     openvzActive,
+    NULL, /* sigHandler */
 };
 
 int openvzRegister(void) {
Index: tests/testutils.c
===================================================================
RCS file: /data/cvs/libvirt/tests/testutils.c,v
retrieving revision 1.16
diff -u -p -r1.16 testutils.c
--- tests/testutils.c	29 May 2008 19:41:40 -0000	1.16
+++ tests/testutils.c	12 Jun 2008 11:19:09 -0000
@@ -329,10 +329,7 @@ int virtTestMain(int argc,
     int oomCount;
 
     if ((debugStr = getenv("VIR_TEST_DEBUG")) != NULL) {
-        if (virStrToLong_i(debugStr, NULL, 10, &testDebug) < 0)
-            testDebug = 0;
-
-        if (testDebug < 0)
+        if (virStrToLong_ui(debugStr, NULL, 10, &testDebug) < 0)
             testDebug = 0;
     }
 


-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]