[Libvir] avoid new warnings

Jim Meyering jim at meyering.net
Fri Feb 22 10:49:49 UTC 2008


Here are two easy ones:

	With --without-xen, avoid warning about unused function.
	* tests/statstest.c (testQuietError) [!WITH_XEN]: Don't define.

---
 tests/statstest.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/tests/statstest.c b/tests/statstest.c
index 6213da8..2d6fc1d 100644
--- a/tests/statstest.c
+++ b/tests/statstest.c
@@ -7,10 +7,13 @@
 #include "stats_linux.h"
 #include "internal.h"

-static void testQuietError(void *userData ATTRIBUTE_UNUSED, virErrorPtr error ATTRIBUTE_UNUSED)
+#if WITH_XEN
+static void testQuietError(void *userData ATTRIBUTE_UNUSED,
+                           virErrorPtr error ATTRIBUTE_UNUSED)
 {
     /* nada */
 }
+#endif

 #if __linux__ && WITH_XEN
 static int testDevice(const char *path, int expect)
--
=============================================================================


	With --enable-iptables-lokkit=no, avoid warning about unused parameter.
	* src/iptables.c (iptRulesSave) [!ENABLE_IPTABLES_LOKKIT]:
	Mark parameter as used.

---
 src/iptables.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/iptables.c b/src/iptables.c
index 04b1da6..f970701 100644
--- a/src/iptables.c
+++ b/src/iptables.c
@@ -256,6 +256,8 @@ iptRulesSave(iptRules *rules)
         notifyRulesUpdated(rules->table, rules->path);
     else
         notifyRulesRemoved(rules->table, rules->path);
+#else
+    (void) rules;
 #endif /* ENABLE_IPTABLES_LOKKIT */
 }

--
1.5.4.2.185.gf5f8




More information about the libvir-list mailing list