IVGCVSW-4246 Clean build of ArmNN API with -Wextra
authorFrancis Murtagh <francis.murtagh@arm.com>
Tue, 31 Dec 2019 12:44:20 +0000 (12:44 +0000)
committerFrancis Murtagh <francis.murtagh@arm.com>
Tue, 31 Dec 2019 12:44:20 +0000 (12:44 +0000)
Change-Id: I6003d2f82ca02d926dd95abee712337783eacfc7
Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
include/armnn/Logging.hpp
src/armnn/test/DebugCallbackTest.cpp
src/armnn/test/OptionalTest.cpp
src/armnn/test/SubgraphViewTests.cpp
src/armnn/test/TensorHandleStrategyTest.cpp

index 72c2194..be84fad 100644 (file)
@@ -50,7 +50,7 @@ class LogSink
 public:
     virtual ~LogSink(){};
 
-    virtual void Consume(const std::string& s) = 0;
+    virtual void Consume(const std::string&) = 0;
 private:
 
 };
@@ -112,6 +112,7 @@ class DebugOutputSink : public LogSink
 public:
     void Consume(const std::string& s) override
     {
+        boost::ignore_unused(s);
 #if defined(_MSC_VER)
         OutputDebugString(s.c_str());
         OutputDebugString("\n");
index 0b1abbf..bd8bdd5 100644 (file)
@@ -60,6 +60,7 @@ BOOST_AUTO_TEST_CASE(RuntimeRegisterDebugCallback)
     std::vector<unsigned int> slotIndexes;
     auto mockCallback = [&](LayerGuid guid, unsigned int slotIndex, ITensorHandle* tensor)
     {
+        boost::ignore_unused(guid);
         slotIndexes.push_back(slotIndex);
         tensorShapes.push_back(tensor->GetShape());
         callCount++;
index f36ab34..fd13643 100644 (file)
@@ -7,15 +7,19 @@
 #include <armnn/Optional.hpp>
 #include <string>
 
+#include <boost/core/ignore_unused.hpp>
+
 namespace
 {
 
 void PassStringRef(armnn::Optional<std::string&> value)
 {
+    boost::ignore_unused(value);
 }
 
 void PassStringRefWithDefault(armnn::Optional<std::string&> value = armnn::EmptyOptional())
 {
+    boost::ignore_unused(value);
 }
 
 } // namespace <anonymous>
index 0f2c5b3..9e44e40 100644 (file)
@@ -535,7 +535,7 @@ BOOST_AUTO_TEST_CASE(DisjointGraphs)
     SubgraphViewSelector::Subgraphs subgraphs =
         SubgraphViewSelector::SelectSubgraphs(graph,
                                               // select the middle layers only
-                                              [](const Layer& l) {
+                                              [](const Layer&) {
                                                   return true;
                                               });
 
index b84e7ab..3e59c0b 100644 (file)
@@ -19,6 +19,8 @@
 #include <vector>
 #include <string>
 
+#include <boost/core/ignore_unused.hpp>
+
 using namespace armnn;
 
 class TestMemMgr : public IMemoryManager
@@ -42,17 +44,20 @@ public:
                                                          TensorShape const& subTensorShape,
                                                          unsigned int const* subTensorOrigin) const override
     {
+        boost::ignore_unused(parent, subTensorShape, subTensorOrigin);
         return nullptr;
     }
 
     std::unique_ptr<ITensorHandle> CreateTensorHandle(const TensorInfo& tensorInfo) const override
     {
+        boost::ignore_unused(tensorInfo);
         return nullptr;
     }
 
     std::unique_ptr<ITensorHandle> CreateTensorHandle(const TensorInfo& tensorInfo,
                                                       DataLayout dataLayout) const override
     {
+        boost::ignore_unused(tensorInfo, dataLayout);
         return nullptr;
     }
 
@@ -80,17 +85,20 @@ public:
                                                          TensorShape const& subTensorShape,
                                                          unsigned int const* subTensorOrigin) const override
     {
+        boost::ignore_unused(parent, subTensorShape, subTensorOrigin);
         return nullptr;
     }
 
     std::unique_ptr<ITensorHandle> CreateTensorHandle(const TensorInfo& tensorInfo) const override
     {
+        boost::ignore_unused(tensorInfo);
         return nullptr;
     }
 
     std::unique_ptr<ITensorHandle> CreateTensorHandle(const TensorInfo& tensorInfo,
                                                       DataLayout dataLayout) const override
     {
+        boost::ignore_unused(tensorInfo, dataLayout);
         return nullptr;
     }
 
@@ -115,6 +123,7 @@ public:
 
     IWorkloadFactoryPtr CreateWorkloadFactory(const IMemoryManagerSharedPtr& memoryManager = nullptr) const override
     {
+        boost::ignore_unused(memoryManager);
         return IWorkloadFactoryPtr{};
     }
 
@@ -155,6 +164,7 @@ public:
 
     IWorkloadFactoryPtr CreateWorkloadFactory(const IMemoryManagerSharedPtr& memoryManager = nullptr) const override
     {
+        boost::ignore_unused(memoryManager);
         return IWorkloadFactoryPtr{};
     }
 
@@ -192,6 +202,7 @@ public:
 
     IWorkloadFactoryPtr CreateWorkloadFactory(const IMemoryManagerSharedPtr& memoryManager = nullptr) const override
     {
+        boost::ignore_unused(memoryManager);
         return IWorkloadFactoryPtr{};
     }
 
@@ -228,6 +239,7 @@ public:
 
     IWorkloadFactoryPtr CreateWorkloadFactory(const IMemoryManagerSharedPtr& memoryManager = nullptr) const override
     {
+        boost::ignore_unused(memoryManager);
         return IWorkloadFactoryPtr{};
     }