[libvirt] [PATCH] virt-host-validate: Fix build on non-Linux

Michal Privoznik posted 1 patch 5 years, 5 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/e2497881f774d043dae6ebd95bfcf299d7a2998c.1538984088.git.mprivozn@redhat.com
tools/virt-host-validate-common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[libvirt] [PATCH] virt-host-validate: Fix build on non-Linux
Posted by Michal Privoznik 5 years, 5 months ago
For non-Linux platforms we have
virHostValidateCGroupControllers() stub which only reports an
error. But we are not marking the ignored arguments the way we
should.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 tools/virt-host-validate-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/virt-host-validate-common.c b/tools/virt-host-validate-common.c
index 4e70fe9e9c..73e3bdb34c 100644
--- a/tools/virt-host-validate-common.c
+++ b/tools/virt-host-validate-common.c
@@ -322,8 +322,8 @@ int virHostValidateCGroupControllers(const char *hvname,
     return ret;
 }
 #else /*  !__linux__ */
-int virHostValidateCGroupControllers(const char *hvname,
-                                     int controllers,
+int virHostValidateCGroupControllers(const char *hvname ATTRIBUTE_UNUSED,
+                                     int controllers ATTRIBUTE_UNUSED,
                                      virHostValidateLevel level)
 {
     virHostMsgFail(level, "%s", "This platform does not support cgroups");
-- 
2.18.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] virt-host-validate: Fix build on non-Linux
Posted by Pavel Hrdina 5 years, 5 months ago
On Mon, Oct 08, 2018 at 09:34:48AM +0200, Michal Privoznik wrote:
> For non-Linux platforms we have
> virHostValidateCGroupControllers() stub which only reports an
> error. But we are not marking the ignored arguments the way we
> should.
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  tools/virt-host-validate-common.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list