COMPMID-2177 Fix clang warnings

Change-Id: I78039db8c58d7b14a042c41e54c25fb9cb509bf7
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1092
Reviewed-by: VidhyaSudhan Loganathan <vidhyasudhan.loganathan@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/examples/gc_absdiff.cpp b/examples/gc_absdiff.cpp
index f534592..6793df0 100644
--- a/examples/gc_absdiff.cpp
+++ b/examples/gc_absdiff.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -40,7 +40,8 @@
 public:
     bool do_setup(int argc, char **argv) override
     {
-        PPMLoader ppm1, ppm2;
+        PPMLoader ppm1{};
+        PPMLoader ppm2{};
 
         GCScheduler::get().default_init();
         if(argc < 2)
diff --git a/examples/gc_dc.cpp b/examples/gc_dc.cpp
index f3f1942..6d09eba 100644
--- a/examples/gc_dc.cpp
+++ b/examples/gc_dc.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -81,7 +81,7 @@
         Window window;
         window.use_tensor_dimensions(src_shape);
         Iterator it(&src, window);
-        execute_window_loop(window, [&](const Coordinates & id)
+        execute_window_loop(window, [&](const Coordinates &)
         {
             *reinterpret_cast<half_float::half *>(it.ptr()) = half_float::half(1.f);
         });
diff --git a/examples/graph_deepspeech_v0_4_1.cpp b/examples/graph_deepspeech_v0_4_1.cpp
index f280393..a69d235 100644
--- a/examples/graph_deepspeech_v0_4_1.cpp
+++ b/examples/graph_deepspeech_v0_4_1.cpp
@@ -308,19 +308,22 @@
         graph.graph().add_connection(split_nid, 3, sigmoid_2_nid, 0);
         set_node_params(graph.graph(), sigmoid_2_nid, sigmoid_2_params);
 
-        SubStream mul_1_ss(graph);
-        mul_1_ss.forward_tail(sigmoid_1_nid);
-        mul_1_ss << EltwiseLayer(std::move(mul_1_ss), std::move(tanh_ss), EltwiseOperation::Mul)
+        SubStream sigmoid_1_ss(graph);
+        sigmoid_1_ss.forward_tail(sigmoid_1_nid);
+        SubStream mul_1_ss(sigmoid_1_ss);
+        mul_1_ss << EltwiseLayer(std::move(sigmoid_1_ss), std::move(tanh_ss), EltwiseOperation::Mul)
                  .set_name(cell_name + "/mul_1");
 
-        SubStream tanh_1_ss(graph);
-        tanh_1_ss.forward_tail(add_nid);
-        tanh_1_ss << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC))
-                  .set_name(cell_name + "/Sigmoid");
-        tanh_1_ss << EltwiseLayer(std::move(tanh_1_ss), std::move(previous_state_c), EltwiseOperation::Mul)
-                  .set_name(cell_name + "/mul");
+        SubStream tanh_1_ss_tmp(graph);
+        tanh_1_ss_tmp.forward_tail(add_nid);
 
-        tanh_1_ss << EltwiseLayer(std::move(tanh_1_ss), std::move(mul_1_ss), EltwiseOperation::Add)
+        tanh_1_ss_tmp << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC))
+                      .set_name(cell_name + "/Sigmoid");
+        SubStream tanh_1_ss_tmp2(tanh_1_ss_tmp);
+        tanh_1_ss_tmp2 << EltwiseLayer(std::move(tanh_1_ss_tmp), std::move(previous_state_c), EltwiseOperation::Mul)
+                       .set_name(cell_name + "/mul");
+        SubStream tanh_1_ss(tanh_1_ss_tmp2);
+        tanh_1_ss << EltwiseLayer(std::move(tanh_1_ss_tmp2), std::move(mul_1_ss), EltwiseOperation::Add)
                   .set_name(cell_name + "/new_state_c");
         SubStream new_state_c(tanh_1_ss);
 
diff --git a/examples/neon_convolution.cpp b/examples/neon_convolution.cpp
index 1a7e865..56b4ddc 100644
--- a/examples/neon_convolution.cpp
+++ b/examples/neon_convolution.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2018 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -32,7 +32,7 @@
 
 /** Gaussian 3x3 matrix
  */
-const int16_t gaussian3x3[] =
+const std::array<int16_t, 9> gaussian3x3 =
 {
     1, 2, 1,
     2, 4, 2,
@@ -41,7 +41,7 @@
 
 /** Gaussian 5x5 matrix
  */
-const int16_t gaussian5x5[] =
+const std::array<int16_t, 25> gaussian5x5 =
 {
     1, 4, 6, 4, 1,
     4, 16, 24, 16, 4,
@@ -79,8 +79,8 @@
 
         // Apply a Gaussian 3x3 filter to the source image followed by a Gaussian 5x5:
         // The function will automatically update the padding information inside input and output to match its requirements
-        conv3x3.configure(&src, &tmp, gaussian3x3, 0 /* Let arm_compute calculate the scale */, BorderMode::UNDEFINED);
-        conv5x5.configure(&tmp, &dst, gaussian5x5, 0 /* Let arm_compute calculate the scale */, BorderMode::UNDEFINED);
+        conv3x3.configure(&src, &tmp, gaussian3x3.data(), 0 /* Let arm_compute calculate the scale */, BorderMode::UNDEFINED);
+        conv5x5.configure(&tmp, &dst, gaussian5x5.data(), 0 /* Let arm_compute calculate the scale */, BorderMode::UNDEFINED);
 
         // Now that the padding requirements are known we can allocate the images:
         src.allocator()->allocate();
diff --git a/examples/neon_sgemm.cpp b/examples/neon_sgemm.cpp
index f6f93dd..8f395de 100644
--- a/examples/neon_sgemm.cpp
+++ b/examples/neon_sgemm.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -36,7 +36,9 @@
 public:
     bool do_setup(int argc, char **argv) override
     {
-        NPYLoader npy0, npy1, npy2;
+        NPYLoader npy0;
+        NPYLoader npy1;
+        NPYLoader npy2;
         alpha = 1.0f;
         beta  = 0.0f;