render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
7a3408
From b6cd6d4baa1d07833321e06d0faff41a44b061a9 Mon Sep 17 00:00:00 2001
7a3408
Message-Id: <b6cd6d4baa1d07833321e06d0faff41a44b061a9@dist-git>
7a3408
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
7a3408
Date: Thu, 3 Sep 2015 15:44:53 +0200
7a3408
Subject: [PATCH] selinux: fix compile errors
7a3408
7a3408
https://bugzilla.redhat.com/show_bug.cgi?id=1146886
7a3408
7a3408
Remove unused variable, tag unused parameter and adjust return type.
7a3408
7a3408
introduced by 3f48345f7ec0c44b8ce2371cab454d2118f830b4
7a3408
7a3408
CC     security/libvirt_security_manager_la-security_selinux.lo
7a3408
security/security_selinux.c: In function 'virSecuritySELinuxDomainSetDirLabel':
7a3408
security/security_selinux.c:2520:5: error: return makes pointer from integer without a cast [-Werror]
7a3408
security/security_selinux.c:2514:9: error: unused variable 'ret' [-Werror=unused-variable]
7a3408
security/security_selinux.c:2509:59: error: unused parameter 'mgr' [-Werror=unused-parameter]
7a3408
7a3408
(cherry picked from commit 4d4c90dfd5475c100c6fd3fb705011e0d90d793e)
7a3408
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7a3408
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
7a3408
---
7a3408
 src/security/security_selinux.c | 5 ++---
7a3408
 1 file changed, 2 insertions(+), 3 deletions(-)
7a3408
7a3408
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
7a3408
index d4bfee7..d2e5aa2 100644
7a3408
--- a/src/security/security_selinux.c
7a3408
+++ b/src/security/security_selinux.c
7a3408
@@ -2505,13 +2505,12 @@ virSecuritySELinuxGetSecurityMountOptions(virSecurityManagerPtr mgr,
7a3408
     return opts;
7a3408
 }
7a3408
 
7a3408
-static char *
7a3408
-virSecuritySELinuxDomainSetDirLabel(virSecurityManagerPtr mgr,
7a3408
+static int
7a3408
+virSecuritySELinuxDomainSetDirLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
7a3408
                                     virDomainDefPtr def,
7a3408
                                     const char *path)
7a3408
 {
7a3408
     virSecurityLabelDefPtr seclabel;
7a3408
-    int ret = -1;
7a3408
 
7a3408
     seclabel = virDomainDefGetSecurityLabelDef(def, SECURITY_SELINUX_NAME);
7a3408
     if (!seclabel || !seclabel->relabel)
7a3408
-- 
7a3408
2.5.1
7a3408