From c2e36c0b0905721bcc704cb3af99ad04b82b6ed3 Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flow@cs.fau.de>
Date: Thu, 3 Aug 2017 11:37:59 +0200
Subject: [PATCH] Ignore -Wattributes

It appears that gcc does not support __attribute__((unused)) on class
members and thus emits an warning when he finds it.
---
 emper/strategies/laws/LawsDispatcher.hpp | 3 +++
 emper/strategies/laws/LawsScheduler.hpp  | 3 +++
 emper/strategies/ws/WsScheduler.hpp      | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/emper/strategies/laws/LawsDispatcher.hpp b/emper/strategies/laws/LawsDispatcher.hpp
index 46bdd437..3d16e800 100644
--- a/emper/strategies/laws/LawsDispatcher.hpp
+++ b/emper/strategies/laws/LawsDispatcher.hpp
@@ -8,11 +8,14 @@ class LawsDispatcher : public Dispatcher {
 
 private:
 
+	#pragma GCC diagnostic push
+	#pragma GCC diagnostic ignored "-Wattributes"
 	LawsStrategy& lawsStrategy
 #ifndef EMPER_STATS
 	ATTR_UNUSED
 #endif
 	;
+	#pragma GCC diagnostic pop
 
 public:
 	LawsDispatcher(Runtime& runtime, LawsStrategy& lawsStrategy) : Dispatcher(runtime)
diff --git a/emper/strategies/laws/LawsScheduler.hpp b/emper/strategies/laws/LawsScheduler.hpp
index d49b0ebb..f3ce4269 100644
--- a/emper/strategies/laws/LawsScheduler.hpp
+++ b/emper/strategies/laws/LawsScheduler.hpp
@@ -40,11 +40,14 @@ private:
 
 	WsQueue<QUEUE_SIZE>* mainThreadQueue;
 
+	#pragma GCC diagnostic push
+	#pragma GCC diagnostic ignored "-Wattributes"
 	LawsStrategy& lawsStrategy
 #ifndef EMPER_STATS
 	ATTR_UNUSED
 #endif
 	;
+	#pragma GCC diagnostic pop
 
 public:
 
diff --git a/emper/strategies/ws/WsScheduler.hpp b/emper/strategies/ws/WsScheduler.hpp
index a40019a5..382caff2 100644
--- a/emper/strategies/ws/WsScheduler.hpp
+++ b/emper/strategies/ws/WsScheduler.hpp
@@ -24,11 +24,14 @@ private:
 
 	WsQueue<QUEUE_SIZE>* mainThreadQueue;
 
+	#pragma GCC diagnostic push
+	#pragma GCC diagnostic ignored "-Wattributes"
 	WsStrategy& wsStrategy
 #ifndef EMPER_STATS
 	ATTR_UNUSED
 #endif
 	;
+	#pragma GCC diagnostic pop
 
 public:
 
-- 
GitLab