]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Change virCgroupGetAppRoot stub on non-Linux to avoid unused param warning
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 13 Dec 2012 13:10:19 +0000 (13:10 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 13 Dec 2012 13:11:44 +0000 (13:11 +0000)
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

index f867fb712e1e534fa5f1d3867a5c4ee3e6342ec4..8f3b8b72440919705a7b461f65883a5bedee3591 100644 (file)
@@ -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: