[PATCH] Change virCgroupGetAppRoot stub on non-Linux to avoid unused param warning

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

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

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

Pushed as a Win32 build breaker fix
---
 src/util/cgroup.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/util/cgroup.c b/src/util/cgroup.c
index f867fb7..8f3b8b7 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:
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]