From cc5c7f9865010853cf218f9d246482a417369d92 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 13 Dec 2012 13:10:19 +0000 Subject: [PATCH] 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 --- src/util/cgroup.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 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 - return -ENXIO; -#endif } +#else +int virCgroupGetAppRoot(virCgroupPtr *group ATTRIBUTE_UNUSED) +{ + return -ENXIO; +} +#endif /** * virCgroupForDomain: