[apparmor] [patch] more gcc 5 errors

Steve Beattie steve at nxnw.org
Tue Feb 17 19:36:01 UTC 2015


On Thu, Feb 12, 2015 at 12:40:41PM -0800, Seth Arnold wrote:
> (I don't have an easy way to test the build with gcc-5, so this may not be
> exhaustive.)

Even with the fix applied, the parser still fails to build with gcc-5,
with the errors:

  http://paste.ubuntu.com/10278117/

The following patch lets the parser build both under gcc-5 and gcc-4.9.
I'm not sure why gcc-5 thinks the types returned by dump_XXXX are wrong.

Signed-off-by: Steve Beattie <steve at nxnw.org> for both trunk and 2.9.
---
 parser/af_rule.cc |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Index: b/parser/af_rule.cc
===================================================================
--- a/parser/af_rule.cc
+++ b/parser/af_rule.cc
@@ -148,11 +148,14 @@ ostream &af_rule::dump_peer(ostream &os)
 
 ostream &af_rule::dump(ostream &os)
 {
-	os << dump_prefix(os);
+	dump_prefix(os);
 	os << af_name;
-	os << dump_local(os);
-	if (has_peer_conds())
-		os << " peer=(" << dump_peer(os) << ")";
+	dump_local(os);
+	if (has_peer_conds()) {
+		os << " peer=(";
+		dump_peer(os);
+		os  << ")";
+	}
 	os << ",\n";
 
 	return os;


-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150217/566457c6/attachment.pgp>


More information about the AppArmor mailing list