Avoids complaints when the compiler is configured to "warn-unused".
A few files contain unnecessary code that results in the compiler
erroring out when -Wunused* options are used. Comment out the code
until such time as it is needed.
---
src/libxl/libxl_conf.c | 2 ++
tests/virnetsockettest.c | 8 ++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 0555b91..f8db4d2 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -305,7 +305,9 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCapsPtr caps)
regmatch_t subs[4];
char *saveptr = NULL;
size_t i;
+/*
virArch hostarch = caps->host.arch;
+*/
struct guest_arch guest_archs[32];
int nr_guest_archs = 0;
diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c
index 5d91f26..988ab43 100644
--- a/tests/virnetsockettest.c
+++ b/tests/virnetsockettest.c
@@ -333,9 +333,10 @@ static int testSocketUNIXAddrs(const void *data ATTRIBUTE_UNUSED)
return ret;
}
+/*
static int testSocketCommandNormal(const void *data ATTRIBUTE_UNUSED)
{
- virNetSocketPtr csock = NULL; /* Client socket */
+ virNetSocketPtr csock = NULL; / * Client socket * /
char buf[100];
size_t i;
int ret = -1;
@@ -360,10 +361,12 @@ static int testSocketCommandNormal(const void *data
ATTRIBUTE_UNUSED)
virObjectUnref(csock);
return ret;
}
+*/
+/*
static int testSocketCommandFail(const void *data ATTRIBUTE_UNUSED)
{
- virNetSocketPtr csock = NULL; /* Client socket */
+ virNetSocketPtr csock = NULL; / * Client socket * /
char buf[100];
int ret = -1;
virCommandPtr cmd = virCommandNewArgList("/bin/cat",
"/dev/does-not-exist", NULL);
@@ -383,6 +386,7 @@ static int testSocketCommandFail(const void *data ATTRIBUTE_UNUSED)
virObjectUnref(csock);
return ret;
}
+*/
struct testSSHData {
const char *nodename;
--
1.9.1