[libvirt] [PATCH] util: fix build on non-Linux

Roman Bogorodskiy posted 1 patch 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1490241011-49492-1-git-send-email-bogorodskiy@gmail.com
src/util/virnetdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[libvirt] [PATCH] util: fix build on non-Linux
Posted by Roman Bogorodskiy 7 years, 1 month ago
Decorate unused arguments of the virNetDevGetMaster() stub
with ATTRIBUTE_UNUSED to fix build on systems where this
stub is used.
---
Pushed as a build-breaker.

 src/util/virnetdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index 6805d32..455239a 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -1017,7 +1017,8 @@ virNetDevGetMaster(const char *ifname, char **master)
 
 
 int
-virNetDevGetMaster(const char *ifname, char **master)
+virNetDevGetMaster(const char *ifname ATTRIBUTE_UNUSED,
+                   char **master ATTRIBUTE_UNUSED)
 {
     virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                    _("Unable to get device master from netlink on this platform"));
-- 
2.7.4

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