summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2012-12-13 13:10:19 +0000
committerDaniel P. Berrange <berrange@redhat.com>2012-12-13 13:11:44 +0000
commitcc5c7f9865010853cf218f9d246482a417369d92 (patch)
tree8a32d4b9180aac1c5631c6824f875a6efa9544b5
parent7339bc4cedb783823718a338952216f471d5abba (diff)
downloadlibvirt-cc5c7f9865010853cf218f9d246482a417369d92.tar.gz
Change virCgroupGetAppRoot stub on non-Linux to avoid unused param warning
Fully stub out the virCgroupGetAppRoot method as done with other methods in the file, rather than just the body. This lets us annotate the unused parameter to avoid a warning
-rw-r--r--src/util/cgroup.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/util/cgroup.c b/src/util/cgroup.c
index f867fb712e..8f3b8b7244 100644
--- a/src/util/cgroup.c
+++ b/src/util/cgroup.c
@@ -974,14 +974,17 @@ int virCgroupForDriver(const char *name ATTRIBUTE_UNUSED,
*
* Returns 0 on success
*/
+#if defined HAVE_MNTENT_H && defined HAVE_GETMNTENT_R
int virCgroupGetAppRoot(virCgroupPtr *group)
{
-#if defined HAVE_MNTENT_H && defined HAVE_GETMNTENT_R
return virCgroupNew("/", group);
+}
#else
+int virCgroupGetAppRoot(virCgroupPtr *group ATTRIBUTE_UNUSED)
+{
return -ENXIO;
-#endif
}
+#endif
/**
* virCgroupForDomain: