From d3d6d2639b2a5ab38e9d3e8cd5d161bac86c410e Mon Sep 17 00:00:00 2001
From: Olivier BICHLER <olivier.bichler@cea.fr>
Date: Tue, 29 Aug 2023 17:07:50 +0200
Subject: [PATCH] Removed __attribute__((unused))

---
 include/aidge/operator/AddImpl.hpp           | 12 ++++++------
 include/aidge/operator/AvgPoolingImpl.hpp    |  2 +-
 include/aidge/operator/BatchNormImpl.hpp     |  2 +-
 include/aidge/operator/ConvDepthWiseImpl.hpp |  2 +-
 include/aidge/operator/ConvImpl.hpp          |  2 +-
 include/aidge/operator/FCImpl.hpp            |  2 +-
 include/aidge/operator/LeakyReLUImpl.hpp     |  2 +-
 include/aidge/operator/ProducerImpl.hpp      |  2 +-
 include/aidge/operator/ReLUImpl.hpp          |  2 +-
 include/aidge/operator/SoftmaxImpl.hpp       |  2 +-
 src/operator/AddImpl.cpp                     |  2 +-
 src/operator/BatchNormImpl.cpp               |  4 ++--
 src/operator/ConvDepthWiseImpl.cpp           |  4 ++--
 src/operator/ConvImpl.cpp                    |  4 ++--
 src/operator/FCImpl.cpp                      |  2 +-
 src/operator/LeakyReLUImpl.cpp               |  2 +-
 src/operator/ProducerImpl.cpp                |  2 +-
 src/operator/ReLUImpl.cpp                    |  2 +-
 src/operator/SoftmaxImpl.cpp                 |  2 +-
 19 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/include/aidge/operator/AddImpl.hpp b/include/aidge/operator/AddImpl.hpp
index 8bd954c0..9f61862d 100644
--- a/include/aidge/operator/AddImpl.hpp
+++ b/include/aidge/operator/AddImpl.hpp
@@ -79,7 +79,7 @@ class AddImpl_cpu : public OperatorImpl {
         return 0;
     }
 
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, const std::vector<DimSize_t>& inputsSize) const override final {
+    NbElts_t getRequiredMemory(const IOIndex_t /*outputIdx*/, const std::vector<DimSize_t>& inputsSize) const override final {
         // Requires the whole tensors, regardless of available data on inputs
         assert(outputIdx == 0 && "operator has only one output");
 
@@ -123,8 +123,8 @@ class AddImpl_cpu<1> : public OperatorImpl {
 
     NbElts_t getNbRequiredProtected(const IOIndex_t /*inputIdx*/) const override final;
 
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx,
-                               __attribute__((unused)) const std::vector<DimSize_t> &inputsSize) const override final;
+    NbElts_t getRequiredMemory(const IOIndex_t /*outputIdx*/,
+                               const std::vector<DimSize_t> &/*inputsSize*/) const override final;
 
     NbElts_t getNbConsumedData(const IOIndex_t /*inputIdx*/) const override final;
 
@@ -154,8 +154,8 @@ class AddImpl_cpu<2> : public OperatorImpl {
 
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
 
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx,
-                               __attribute__((unused)) const std::vector<DimSize_t>& inputsSize) const override final;
+    NbElts_t getRequiredMemory(const IOIndex_t /*outputIdx*/,
+                               const std::vector<DimSize_t>& /*inputsSize*/) const override final;
 
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
 
@@ -185,7 +185,7 @@ class AddImpl_cpu<3> : public OperatorImpl {
 
     NbElts_t getNbRequiredProtected(const IOIndex_t /*inputIdx*/) const override final;
 
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, const std::vector<DimSize_t>& /*inputsSize*/) const override final;
+    NbElts_t getRequiredMemory(const IOIndex_t /*outputIdx*/, const std::vector<DimSize_t>& /*inputsSize*/) const override final;
 
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
 
diff --git a/include/aidge/operator/AvgPoolingImpl.hpp b/include/aidge/operator/AvgPoolingImpl.hpp
index 5cde8bbd..ceb4a02d 100644
--- a/include/aidge/operator/AvgPoolingImpl.hpp
+++ b/include/aidge/operator/AvgPoolingImpl.hpp
@@ -51,7 +51,7 @@ class AvgPoolingImpl2D_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, const std::vector<DimSize_t> &inputsSize) const override final;
+    NbElts_t getRequiredMemory(const IOIndex_t /*outputIdx*/, const std::vector<DimSize_t> &inputsSize) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/include/aidge/operator/BatchNormImpl.hpp b/include/aidge/operator/BatchNormImpl.hpp
index 37d644f0..8b1e5542 100644
--- a/include/aidge/operator/BatchNormImpl.hpp
+++ b/include/aidge/operator/BatchNormImpl.hpp
@@ -66,7 +66,7 @@ class BatchNormImpl2D_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, const std::vector<DimSize_t> &inputsSize) const override final;
+    NbElts_t getRequiredMemory(const IOIndex_t /*outputIdx*/, const std::vector<DimSize_t> &inputsSize) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/include/aidge/operator/ConvDepthWiseImpl.hpp b/include/aidge/operator/ConvDepthWiseImpl.hpp
index 64f5df8c..fbeb2b66 100644
--- a/include/aidge/operator/ConvDepthWiseImpl.hpp
+++ b/include/aidge/operator/ConvDepthWiseImpl.hpp
@@ -53,7 +53,7 @@ class ConvDepthWiseImpl2D_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t> &inputsSize) const override final;
+    NbElts_t getRequiredMemory(const IOIndex_t /*outputIdx*/, const std::vector<DimSize_t> &/*inputsSize*/) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/include/aidge/operator/ConvImpl.hpp b/include/aidge/operator/ConvImpl.hpp
index 7bdeb059..7c7b8d3a 100644
--- a/include/aidge/operator/ConvImpl.hpp
+++ b/include/aidge/operator/ConvImpl.hpp
@@ -53,7 +53,7 @@ class ConvImpl2D_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t> &inputsSize) const override final;
+    NbElts_t getRequiredMemory(const IOIndex_t /*outputIdx*/, const std::vector<DimSize_t> &/*inputsSize*/) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/include/aidge/operator/FCImpl.hpp b/include/aidge/operator/FCImpl.hpp
index 44f53a57..2264bc50 100644
--- a/include/aidge/operator/FCImpl.hpp
+++ b/include/aidge/operator/FCImpl.hpp
@@ -47,7 +47,7 @@ class FCImpl_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t> &inputsSize) const override final;
+    NbElts_t getRequiredMemory(const IOIndex_t /*outputIdx*/, const std::vector<DimSize_t> &/*inputsSize*/) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/include/aidge/operator/LeakyReLUImpl.hpp b/include/aidge/operator/LeakyReLUImpl.hpp
index dd5bc4d9..c15a441f 100644
--- a/include/aidge/operator/LeakyReLUImpl.hpp
+++ b/include/aidge/operator/LeakyReLUImpl.hpp
@@ -46,7 +46,7 @@ class LeakyReLUImpl_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t>& inputsSize) const override final;
+    NbElts_t getRequiredMemory(const IOIndex_t /*outputIdx*/, const std::vector<DimSize_t>& /*inputsSize*/) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/include/aidge/operator/ProducerImpl.hpp b/include/aidge/operator/ProducerImpl.hpp
index d1376df3..c4f4c163 100644
--- a/include/aidge/operator/ProducerImpl.hpp
+++ b/include/aidge/operator/ProducerImpl.hpp
@@ -34,7 +34,7 @@ class ProducerImpl_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t> &inputsSize) const override final;
+    NbElts_t getRequiredMemory(const IOIndex_t /*outputIdx*/, const std::vector<DimSize_t> &/*inputsSize*/) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/include/aidge/operator/ReLUImpl.hpp b/include/aidge/operator/ReLUImpl.hpp
index 905a7691..dc4d3907 100644
--- a/include/aidge/operator/ReLUImpl.hpp
+++ b/include/aidge/operator/ReLUImpl.hpp
@@ -46,7 +46,7 @@ class ReLUImpl_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t>& inputsSize) const override final;
+    NbElts_t getRequiredMemory(const IOIndex_t /*outputIdx*/, const std::vector<DimSize_t>& /*inputsSize*/) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/include/aidge/operator/SoftmaxImpl.hpp b/include/aidge/operator/SoftmaxImpl.hpp
index c4d718bb..289e1ef9 100644
--- a/include/aidge/operator/SoftmaxImpl.hpp
+++ b/include/aidge/operator/SoftmaxImpl.hpp
@@ -46,7 +46,7 @@ class SoftmaxImpl_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t>& inputsSize) const override final;
+    NbElts_t getRequiredMemory(const IOIndex_t /*outputIdx*/, const std::vector<DimSize_t>& /*inputsSize*/) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/src/operator/AddImpl.cpp b/src/operator/AddImpl.cpp
index f4e08ba5..ece1967a 100644
--- a/src/operator/AddImpl.cpp
+++ b/src/operator/AddImpl.cpp
@@ -95,7 +95,7 @@ Aidge::NbElts_t Aidge::AddImpl_cpu<2>::getNbRequiredProtected(const Aidge::IOInd
     return 0;
 }
 
-Aidge::NbElts_t Aidge::AddImpl_cpu<2>::getRequiredMemory(const Aidge::IOIndex_t outputIdx, __attribute__((unused)) const std::vector<Aidge::DimSize_t>& inputsSize) const {
+Aidge::NbElts_t Aidge::AddImpl_cpu<2>::getRequiredMemory(const Aidge::IOIndex_t outputIdx, const std::vector<Aidge::DimSize_t>& /*inputsSize*/) const {
     // Requires the whole tensors, regardless of available data on inputs
     assert(outputIdx == 0 && "operator has only one output");
 
diff --git a/src/operator/BatchNormImpl.cpp b/src/operator/BatchNormImpl.cpp
index 5bb7d0a9..a95054dd 100644
--- a/src/operator/BatchNormImpl.cpp
+++ b/src/operator/BatchNormImpl.cpp
@@ -34,8 +34,8 @@ Aidge::NbElts_t Aidge::BatchNormImpl2D_cpu::getNbRequiredProtected(IOIndex_t /*i
     return 0;
 }
 
-Aidge::NbElts_t Aidge::BatchNormImpl2D_cpu::getRequiredMemory(__attribute__((unused)) const Aidge::IOIndex_t outputIdx,
-                                                              __attribute__((unused)) const std::vector<Aidge::DimSize_t> &inputsSize) const {
+Aidge::NbElts_t Aidge::BatchNormImpl2D_cpu::getRequiredMemory(const Aidge::IOIndex_t /*outputIdx*/,
+                                                              const std::vector<Aidge::DimSize_t> &/*inputsSize*/) const {
     // Requires the whole tensors, regardless of available data on inputs
     assert(outputIdx == 0 && "operator has only one output");
 
diff --git a/src/operator/ConvDepthWiseImpl.cpp b/src/operator/ConvDepthWiseImpl.cpp
index 178d602f..ce5063dd 100644
--- a/src/operator/ConvDepthWiseImpl.cpp
+++ b/src/operator/ConvDepthWiseImpl.cpp
@@ -36,8 +36,8 @@ Aidge::NbElts_t Aidge::ConvDepthWiseImpl2D_cpu::getNbRequiredProtected(IOIndex_t
     return 0;
 }
 
-Aidge::NbElts_t Aidge::ConvDepthWiseImpl2D_cpu::getRequiredMemory(__attribute__((unused)) const Aidge::IOIndex_t outputIdx,
-                                                           __attribute__((unused)) const std::vector<Aidge::DimSize_t> &inputsSize) const {
+Aidge::NbElts_t Aidge::ConvDepthWiseImpl2D_cpu::getRequiredMemory(const Aidge::IOIndex_t /*outputIdx*/,
+                                                           const std::vector<Aidge::DimSize_t> &/*inputsSize*/) const {
     // Requires the whole tensors, regardless of available data on inputs
     assert(outputIdx == 0 && "operator has only one output");
 
diff --git a/src/operator/ConvImpl.cpp b/src/operator/ConvImpl.cpp
index 58c83da1..a1b3e2ca 100644
--- a/src/operator/ConvImpl.cpp
+++ b/src/operator/ConvImpl.cpp
@@ -36,8 +36,8 @@ Aidge::NbElts_t Aidge::ConvImpl2D_cpu::getNbRequiredProtected(IOIndex_t /*inputI
     return 0;
 }
 
-Aidge::NbElts_t Aidge::ConvImpl2D_cpu::getRequiredMemory(__attribute__((unused)) const Aidge::IOIndex_t outputIdx,
-                                                         __attribute__((unused)) const std::vector<Aidge::DimSize_t> &inputsSize) const {
+Aidge::NbElts_t Aidge::ConvImpl2D_cpu::getRequiredMemory(const Aidge::IOIndex_t /*outputIdx*/,
+                                                         const std::vector<Aidge::DimSize_t> &/*inputsSize*/) const {
     // Requires the whole tensors, regardless of available data on inputs
     assert(outputIdx == 0 && "operator has only one output");
 
diff --git a/src/operator/FCImpl.cpp b/src/operator/FCImpl.cpp
index aa472969..ca4eebcf 100644
--- a/src/operator/FCImpl.cpp
+++ b/src/operator/FCImpl.cpp
@@ -44,7 +44,7 @@ Aidge::NbElts_t
 }
 
 Aidge::NbElts_t Aidge::FCImpl_cpu::getRequiredMemory(
-    __attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t> &inputsSize) const
+    const IOIndex_t /*outputIdx*/, const std::vector<DimSize_t> &/*inputsSize*/) const
 {
     // Requires the whole tensors, regardless of available data on inputs
     assert(outputIdx == 0 && "operator has only one output");
diff --git a/src/operator/LeakyReLUImpl.cpp b/src/operator/LeakyReLUImpl.cpp
index 8c88e1f7..1e86de4a 100644
--- a/src/operator/LeakyReLUImpl.cpp
+++ b/src/operator/LeakyReLUImpl.cpp
@@ -38,7 +38,7 @@ Aidge::NbElts_t Aidge::LeakyReLUImpl_cpu::getNbRequiredProtected(const Aidge::IO
     return 0;
 }
 
-Aidge::NbElts_t Aidge::LeakyReLUImpl_cpu::getRequiredMemory(__attribute__((unused)) const Aidge::IOIndex_t outputIdx, __attribute__((unused)) const std::vector<Aidge::DimSize_t> &inputsSize) const {
+Aidge::NbElts_t Aidge::LeakyReLUImpl_cpu::getRequiredMemory(const Aidge::IOIndex_t /*outputIdx*/, const std::vector<Aidge::DimSize_t> &/*inputsSize*/) const {
     const auto& outputDims = mOp.getOutput(0)->dims();
     return std::accumulate(outputDims.begin(), outputDims.end(),
                         static_cast<NbElts_t>(1), std::multiplies<NbElts_t>());
diff --git a/src/operator/ProducerImpl.cpp b/src/operator/ProducerImpl.cpp
index 69e4ba28..b7f1538d 100644
--- a/src/operator/ProducerImpl.cpp
+++ b/src/operator/ProducerImpl.cpp
@@ -42,7 +42,7 @@ std::size_t Aidge::ProducerImpl_cpu::getNbRequiredProtected(
 
 
 std::size_t Aidge::ProducerImpl_cpu::getRequiredMemory(
-    __attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t> &inputsSize) const
+    const IOIndex_t /*outputIdx*/, const std::vector<DimSize_t> &/*inputsSize*/) const
 {
     // Requires the whole tensors, regardless of available data on inputs
     assert(outputIdx == 0 && "operator has only one output");
diff --git a/src/operator/ReLUImpl.cpp b/src/operator/ReLUImpl.cpp
index 9cbf0efe..61c11937 100644
--- a/src/operator/ReLUImpl.cpp
+++ b/src/operator/ReLUImpl.cpp
@@ -38,7 +38,7 @@ Aidge::NbElts_t Aidge::ReLUImpl_cpu::getNbRequiredProtected(const Aidge::IOIndex
     return 0;
 }
 
-Aidge::NbElts_t Aidge::ReLUImpl_cpu::getRequiredMemory(__attribute__((unused)) const Aidge::IOIndex_t outputIdx, __attribute__((unused)) const std::vector<Aidge::DimSize_t> &inputsSize) const {
+Aidge::NbElts_t Aidge::ReLUImpl_cpu::getRequiredMemory(const Aidge::IOIndex_t /*outputIdx*/, const std::vector<Aidge::DimSize_t> &/*inputsSize*/) const {
     const auto& outputDims = std::static_pointer_cast<Tensor>(mOp.getOutput(0))->dims();
     return std::accumulate(outputDims.begin(), outputDims.end(),
                         static_cast<NbElts_t>(1), std::multiplies<NbElts_t>());
diff --git a/src/operator/SoftmaxImpl.cpp b/src/operator/SoftmaxImpl.cpp
index b0f978c9..50673042 100644
--- a/src/operator/SoftmaxImpl.cpp
+++ b/src/operator/SoftmaxImpl.cpp
@@ -38,7 +38,7 @@ Aidge::NbElts_t Aidge::SoftmaxImpl_cpu::getNbRequiredProtected(const Aidge::IOIn
     return 0;
 }
 
-Aidge::NbElts_t Aidge::SoftmaxImpl_cpu::getRequiredMemory(__attribute__((unused)) const Aidge::IOIndex_t outputIdx, __attribute__((unused)) const std::vector<Aidge::DimSize_t> &inputsSize) const {
+Aidge::NbElts_t Aidge::SoftmaxImpl_cpu::getRequiredMemory(const Aidge::IOIndex_t /*outputIdx*/, const std::vector<Aidge::DimSize_t> &/*inputsSize*/) const {
     const auto& outputDims = std::static_pointer_cast<Tensor>(mOp.getOutput(0))->dims();
     return std::accumulate(outputDims.begin(), outputDims.end(),
                         static_cast<NbElts_t>(1), std::multiplies<NbElts_t>());
-- 
GitLab