Fix build errors with latest GCC and CLang compilers.

git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk@1517422 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/components/cache/memcache.hpp b/components/cache/memcache.hpp
index 06e2061..d9e9a2b 100644
--- a/components/cache/memcache.hpp
+++ b/components/cache/memcache.hpp
@@ -68,7 +68,7 @@
 
 private:
     const gc_child_pool p;
-    const bool owner;
+    unused const bool owner;
     apr_memcache_t* const mc;
 
     friend const failable<bool> post(const value& key, const value& val, const MemCached& cache);
diff --git a/components/filedb/filedb.hpp b/components/filedb/filedb.hpp
index 89e0c1b..22f2dff 100644
--- a/components/filedb/filedb.hpp
+++ b/components/filedb/filedb.hpp
@@ -74,7 +74,7 @@
     }
 
 private:
-    const bool owner;
+    unused const bool owner;
     const string name;
     const string format;
 
diff --git a/configure.ac b/configure.ac
index b0992a5..041c83a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,7 +121,7 @@
   if test "${cxxtype}" = "clang"; then
     cxxflags="${cxxflags} -O1 -stdlib=libc++ -Qunused-arguments -Wno-return-type-c-linkage"
   else
-    cxxflags="${cxxflags} -O2 -Wlogical-op -Wconversion"
+    cxxflags="${cxxflags} -O2 -Wlogical-op -Wconversion -Wno-attributes"
   fi
   AM_CONDITIONAL([WANT_MAINTAINER_MODE], true)
   AC_DEFINE([WANT_MAINTAINER_MODE], 1, [compile with debugging and compile-time warnings])
diff --git a/kernel/gc.hpp b/kernel/gc.hpp
index 2b65132..3f30118 100644
--- a/kernel/gc.hpp
+++ b/kernel/gc.hpp
@@ -325,7 +325,7 @@
     gc_child_pool& operator=(const gc_child_pool& p) = delete;
 
 private:
-    const bool owner;
+    unused const bool owner;
 
     inline apr_pool_t* const mkpool() noexcept {
         apr_pool_t* p;
diff --git a/kernel/mem-test.cpp b/kernel/mem-test.cpp
index 2072da9..89a0bed 100644
--- a/kernel/mem-test.cpp
+++ b/kernel/mem-test.cpp
@@ -67,7 +67,7 @@
     friend ostream& operator<<(ostream& out, const Element& v);
 
     const int i;
-    char c[20];
+    unused char c[20];
 };
 
 ostream& operator<<(ostream& out, const Element& v) {
diff --git a/modules/python/eval.hpp b/modules/python/eval.hpp
index 3728cdb..0a62733 100644
--- a/modules/python/eval.hpp
+++ b/modules/python/eval.hpp
@@ -141,7 +141,7 @@
     }
 
 private:
-    const bool owner;
+    unused const bool owner;
 #ifdef WANT_THREADS
     pthread_mutex_t mutex;
     pthread_mutex_t pidmutex;
@@ -272,7 +272,7 @@
     }
 
 private:
-    PythonRuntime* const py;
+    unused PythonRuntime* const py;
 #ifdef WANT_THREADS
     PyGILState_STATE gstate;
 #endif
@@ -300,7 +300,7 @@
     }
 
 private:
-    PythonRuntime* const py;
+    unused PythonRuntime* const py;
 #ifdef WANT_THREADS
     PyThreadState* tstate;
 #endif