[libvirt] [PATCH] selinux: fix compile errors

Martin Kletzander mkletzan at redhat.com
Mon Aug 24 12:52:14 UTC 2015


On Mon, Aug 24, 2015 at 02:14:37PM +0200, Guido Günther wrote:
>Remove unused variable, tag unused parameter and adjust return type.
>
>introduced by 3f48345f7ec0c44b8ce2371cab454d2118f830b4
>
>CC     security/libvirt_security_manager_la-security_selinux.lo
>security/security_selinux.c: In function 'virSecuritySELinuxDomainSetDirLabel':
>security/security_selinux.c:2520:5: error: return makes pointer from integer without a cast [-Werror]
>security/security_selinux.c:2514:9: error: unused variable 'ret' [-Werror=unused-variable]
>security/security_selinux.c:2509:59: error: unused parameter 'mgr' [-Werror=unused-parameter]
>---
> src/security/security_selinux.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>

Sorry for that, ACK.

>diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
>index d4bfee7..d2e5aa2 100644
>--- a/src/security/security_selinux.c
>+++ b/src/security/security_selinux.c
>@@ -2505,13 +2505,12 @@ virSecuritySELinuxGetSecurityMountOptions(virSecurityManagerPtr mgr,
>     return opts;
> }
>
>-static char *
>-virSecuritySELinuxDomainSetDirLabel(virSecurityManagerPtr mgr,
>+static int
>+virSecuritySELinuxDomainSetDirLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
>                                     virDomainDefPtr def,
>                                     const char *path)
> {
>     virSecurityLabelDefPtr seclabel;
>-    int ret = -1;
>
>     seclabel = virDomainDefGetSecurityLabelDef(def, SECURITY_SELINUX_NAME);
>     if (!seclabel || !seclabel->relabel)
>--
>2.1.4
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150824/46d0ada6/attachment-0001.sig>


More information about the libvir-list mailing list