IVGCVSW-6178 Add additional compiler warnings to the driver

Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: I2209251736a095583fffc8da774188e0dccfc932
diff --git a/1.0/HalPolicy.cpp b/1.0/HalPolicy.cpp
index 7e9e9ef..d4d6121 100644
--- a/1.0/HalPolicy.cpp
+++ b/1.0/HalPolicy.cpp
@@ -604,7 +604,6 @@
     }
 
     armnn::SpaceToDepthDescriptor desc;
-    bool dataLayoutCheck;
 
     GetInputScalar<hal_1_0::HalPolicy>(operation, 1, OperandType::INT32, desc.m_BlockSize, model, data);
 
diff --git a/Android.mk b/Android.mk
index 06b95a1..1b4e248 100644
--- a/Android.mk
+++ b/Android.mk
@@ -269,6 +269,9 @@
         -std=$(CPP_VERSION) \
         -fexceptions \
         -Werror \
+        -Wall \
+        -Wextra \
+        -Wno-unused-function \
         -Wno-format-security \
         -DARMNN_ANDROID_NN_V1_1
 
@@ -392,6 +395,9 @@
         -std=$(CPP_VERSION) \
         -fexceptions \
         -Werror \
+        -Wall \
+        -Wextra \
+        -Wno-unused-function \
         -Wno-format-security \
         -DARMNN_ANDROID_NN_V1_2
 
@@ -514,6 +520,9 @@
         -std=$(CPP_VERSION) \
         -fexceptions \
         -Werror \
+        -Wall \
+        -Wextra \
+        -Wno-unused-function \
         -Wno-format-security \
         -DARMNN_ANDROID_NN_V1_3 \
 
diff --git a/ConversionUtils_1_2.hpp b/ConversionUtils_1_2.hpp
index c66a2f5..a95b1c1 100644
--- a/ConversionUtils_1_2.hpp
+++ b/ConversionUtils_1_2.hpp
@@ -463,7 +463,6 @@
     desc.m_DataLayout = OptionalDataLayout<HalPolicy>(operation, dataLayoutFlagIndex, model, data);
 
     armnnUtils::DataLayoutIndexed dataLayoutIndexed(desc.m_DataLayout);
-    unsigned int channelsIndex = dataLayoutIndexed.GetChannelsIndex();
     unsigned int widthIndex = dataLayoutIndexed.GetWidthIndex();
     unsigned int heightIndex = dataLayoutIndexed.GetHeightIndex();
 
@@ -780,7 +779,7 @@
                      __func__, outputDimensions, inputDimensions, indicesDimensions);
     }
 
-    int32_t axis;
+    uint32_t axis;
     if (!GetInputScalar<HalPolicy>(operation, 1, HalOperandType::INT32, axis, model, data))
     {
         return Fail("%s: Operation has invalid or unsupported axis operand", __func__);
@@ -890,7 +889,6 @@
     const TensorShape& inputShape   = inputInfo.GetShape();
     const TensorShape& outputShape  = outputInfo.GetShape();
     const TensorShape& weightsShape = weights.GetShape();
-    const TensorShape& biasesShape  = biases.GetShape();
 
     armnnUtils::DataLayoutIndexed dataLayoutIndexed(dataLayout);
     const unsigned int channelsIndex = dataLayoutIndexed.GetChannelsIndex();
@@ -901,7 +899,7 @@
     desc.m_DataLayout  = dataLayout;
     desc.m_BiasEnabled = true;
 
-    int numGroups;
+    unsigned int numGroups;
     ActivationFn activation;
 
     if (operation.inputs.size() == 12)
diff --git a/ModelToINetworkConverter.cpp b/ModelToINetworkConverter.cpp
index 41716b0..4665ef1 100644
--- a/ModelToINetworkConverter.cpp
+++ b/ModelToINetworkConverter.cpp
@@ -95,7 +95,6 @@
             ALOGV("ModelToINetworkConverter::Convert(): getMainModel(m_Model).operands[inputIndex];");
             const HalOperand& operand = getMainModel(m_Model).operands[inputIndex];
             ALOGV("ModelToINetworkConverter::Convert(): GetTensorInfoForOperand(operand)");
-            const armnn::TensorInfo& tensor = GetTensorInfoForOperand(operand);
             const std::string layerName = "Input_" + std::to_string(i);
             ALOGV("ModelToINetworkConverter::Convert(): m_Data.m_Network->AddInputLayer(i, layerName.c_str())");
             armnn::IConnectableLayer* layer = m_Data.m_Network->AddInputLayer(i, layerName.c_str());
@@ -192,8 +191,6 @@
             {
                 // outputs in android nn are represented by operands
                 uint32_t outputIndex = getMainModel(m_Model).outputIndexes[i];
-                const HalOperand& operand = getMainModel(m_Model).operands[outputIndex];
-                const armnn::TensorInfo& tensor = GetTensorInfoForOperand(operand);
                 const std::string layerName = "Output_" + std::to_string(i);
                 armnn::IConnectableLayer* layer = m_Data.m_Network->AddOutputLayer(i, layerName.c_str());