Fix compilation error when building for Linux (non Android)
authorAyan Halder <ayan.halder@arm.com>
Wed, 25 Dec 2019 23:27:12 +0000 (23:27 +0000)
committerDerek Lamberti <derek.lamberti@arm.com>
Mon, 30 Dec 2019 14:26:06 +0000 (14:26 +0000)
When building for Linux, 'boost::ignore_unused()' should be used to suppress
the following error :-
error: unused parameter 's' [-Werror=unused-parameter]

Change-Id: I9ecfe93c75ee4117eb6d2e1e75442179cee9fec9

include/armnn/Logging.hpp

index 9bf086b..72c2194 100644 (file)
@@ -19,7 +19,7 @@
 #endif
 
 #include <boost/assert.hpp>
-
+#include <boost/core/ignore_unused.hpp>
 
 namespace armnn
 {
@@ -115,9 +115,10 @@ public:
 #if defined(_MSC_VER)
         OutputDebugString(s.c_str());
         OutputDebugString("\n");
-#endif
-#if defined(__ANDROID__)
+#elif defined(__ANDROID__)
         __android_log_write(ANDROID_LOG_DEBUG, "armnn", s.c_str());
+#else
+        boost::ignore_unused(s);
 #endif
     }
 };