[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] fix AppArmo build errors that crept in recently

Not sure when these crept in, but here is a patch so that the build
won't fail when compiling with --enable-compile-warnings=error. Fixes
the following errors:
cc1: warnings being treated as errors
security/security_apparmor.c: In function 'AppArmorSetSecurityAllLabel':
security/security_apparmor.c:381: error: unused variable 'rc'
security/security_apparmor.c: In function
security/security_apparmor.c:436: error: unused parameter 'conn'

Jamie Strandboge             | http://www.canonical.com

--- libvirt.orig/src/security/security_apparmor.c	2010-01-21 10:55:42.000000000 -0600
+++ libvirt/src/security/security_apparmor.c	2010-01-21 11:42:52.000000000 -0600
@@ -378,8 +378,6 @@ AppArmorGenSecurityLabel(virConnectPtr c
 static int
 AppArmorSetSecurityAllLabel(virConnectPtr conn, virDomainObjPtr vm)
-    int rc = -1;
     if (vm->def->seclabel.type == VIR_DOMAIN_SECLABEL_STATIC)
         return 0;
@@ -433,7 +431,7 @@ AppArmorGetSecurityProcessLabel(virConne
  * more details. Currently called via qemudShutdownVMDaemon.
 static int
-AppArmorReleaseSecurityLabel(virConnectPtr conn, virDomainObjPtr vm)
+AppArmorReleaseSecurityLabel(virConnectPtr conn ATTRIBUTE_UNUSED, virDomainObjPtr vm)
     const virSecurityLabelDefPtr secdef = &vm->def->seclabel;

Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]