aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2019-07-08 11:52:46 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2019-07-08 14:45:47 +0000
commitebdde65530c8819a16d558fc5ebb3cc519fbc344 (patch)
tree1b1d9e4838ac008c1c787dee3f441f38f21d77ff
parent74cd112addebc7678cb763cc1cb173feb0e61bb2 (diff)
downloadComputeLibrary-ebdde65530c8819a16d558fc5ebb3cc519fbc344.tar.gz
COMPMID-2432: Fix defects reported by Coverity
Change-Id: I3db7bfffb8da95ca0b6fb0c13fef810756270b49 Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/1490 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--src/core/CL/kernels/CLComparisonKernel.cpp4
-rw-r--r--src/core/CL/kernels/CLElementwiseOperationKernel.cpp4
-rw-r--r--src/core/CL/kernels/CLPixelWiseMultiplicationKernel.cpp8
-rw-r--r--src/core/CL/kernels/CLWeightsReshapeKernel.cpp4
-rw-r--r--src/core/NEON/kernels/NECannyEdgeKernel.cpp2
-rw-r--r--src/core/NEON/kernels/NEPixelWiseMultiplicationKernel.cpp14
-rw-r--r--src/core/NEON/kernels/NEROIPoolingLayerKernel.cpp2
-rw-r--r--src/core/NEON/kernels/NESelectKernel.cpp6
8 files changed, 22 insertions, 22 deletions
diff --git a/src/core/CL/kernels/CLComparisonKernel.cpp b/src/core/CL/kernels/CLComparisonKernel.cpp
index 628f9f18e7..5570ecfc79 100644
--- a/src/core/CL/kernels/CLComparisonKernel.cpp
+++ b/src/core/CL/kernels/CLComparisonKernel.cpp
@@ -210,8 +210,8 @@ void CLComparisonKernel::run(const Window &window, cl::CommandQueue &queue)
enqueue(queue, *this, slice, lws_hint());
- collapsed.slide_window_slice_3D(slice_input1);
- collapsed.slide_window_slice_3D(slice_input2);
+ ARM_COMPUTE_UNUSED(collapsed.slide_window_slice_3D(slice_input1));
+ ARM_COMPUTE_UNUSED(collapsed.slide_window_slice_3D(slice_input2));
}
while(collapsed.slide_window_slice_3D(slice));
}
diff --git a/src/core/CL/kernels/CLElementwiseOperationKernel.cpp b/src/core/CL/kernels/CLElementwiseOperationKernel.cpp
index 4c191de0bd..a69e84a16d 100644
--- a/src/core/CL/kernels/CLElementwiseOperationKernel.cpp
+++ b/src/core/CL/kernels/CLElementwiseOperationKernel.cpp
@@ -300,8 +300,8 @@ void CLElementwiseOperationKernel::run(const Window &window, cl::CommandQueue &q
enqueue(queue, *this, slice, lws_hint());
- collapsed.slide_window_slice_3D(slice_input1);
- collapsed.slide_window_slice_3D(slice_input2);
+ ARM_COMPUTE_UNUSED(collapsed.slide_window_slice_3D(slice_input1));
+ ARM_COMPUTE_UNUSED(collapsed.slide_window_slice_3D(slice_input2));
}
while(collapsed.slide_window_slice_3D(slice));
}
diff --git a/src/core/CL/kernels/CLPixelWiseMultiplicationKernel.cpp b/src/core/CL/kernels/CLPixelWiseMultiplicationKernel.cpp
index 5b00fd15ea..76403d18d4 100644
--- a/src/core/CL/kernels/CLPixelWiseMultiplicationKernel.cpp
+++ b/src/core/CL/kernels/CLPixelWiseMultiplicationKernel.cpp
@@ -276,8 +276,8 @@ void CLPixelWiseMultiplicationKernel::run(const Window &window, cl::CommandQueue
add_3D_tensor_argument(idx, _output, slice);
enqueue(queue, *this, slice);
- collapsed.slide_window_slice_3D(slice_input1);
- collapsed.slide_window_slice_3D(slice_input2);
+ ARM_COMPUTE_UNUSED(collapsed.slide_window_slice_3D(slice_input1));
+ ARM_COMPUTE_UNUSED(collapsed.slide_window_slice_3D(slice_input2));
}
while(collapsed.slide_window_slice_3D(slice));
}
@@ -411,8 +411,8 @@ void CLComplexPixelWiseMultiplicationKernel::run(const Window &window, cl::Comma
add_3D_tensor_argument(idx, _output, slice);
enqueue(queue, *this, slice);
- collapsed.slide_window_slice_3D(slice_input1);
- collapsed.slide_window_slice_3D(slice_input2);
+ ARM_COMPUTE_UNUSED(collapsed.slide_window_slice_3D(slice_input1));
+ ARM_COMPUTE_UNUSED(collapsed.slide_window_slice_3D(slice_input2));
}
while(collapsed.slide_window_slice_3D(slice));
}
diff --git a/src/core/CL/kernels/CLWeightsReshapeKernel.cpp b/src/core/CL/kernels/CLWeightsReshapeKernel.cpp
index 7639a48a5f..590af4d184 100644
--- a/src/core/CL/kernels/CLWeightsReshapeKernel.cpp
+++ b/src/core/CL/kernels/CLWeightsReshapeKernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -152,7 +152,7 @@ void CLWeightsReshapeKernel::run(const Window &window, cl::CommandQueue &queue)
if(_biases != nullptr)
{
add_1D_tensor_argument(idx, _biases, biases_slice);
- biases_window.slide_window_slice_1D(biases_slice);
+ ARM_COMPUTE_UNUSED(biases_window.slide_window_slice_1D(biases_slice));
}
// Run kernel
diff --git a/src/core/NEON/kernels/NECannyEdgeKernel.cpp b/src/core/NEON/kernels/NECannyEdgeKernel.cpp
index 8d822bd701..094b77893a 100644
--- a/src/core/NEON/kernels/NECannyEdgeKernel.cpp
+++ b/src/core/NEON/kernels/NECannyEdgeKernel.cpp
@@ -931,7 +931,7 @@ void NEGradientKernel::configure(const ITensor *gx, const ITensor *gy, ITensor *
AccessWindowHorizontal mag_access(_magnitude->info(), 0, num_elems_processed_per_iteration);
AccessWindowHorizontal phase_access(_phase->info(), 0, num_elems_processed_per_iteration);
- update_window_and_padding(win, gx_access, gy_access, mag_access, phase_access);
+ ARM_COMPUTE_UNUSED(update_window_and_padding(win, gx_access, gy_access, mag_access, phase_access));
mag_access.set_valid_region(win, _gx->info()->valid_region());
phase_access.set_valid_region(win, _gx->info()->valid_region());
diff --git a/src/core/NEON/kernels/NEPixelWiseMultiplicationKernel.cpp b/src/core/NEON/kernels/NEPixelWiseMultiplicationKernel.cpp
index 6aaac818e9..711bde3a2b 100644
--- a/src/core/NEON/kernels/NEPixelWiseMultiplicationKernel.cpp
+++ b/src/core/NEON/kernels/NEPixelWiseMultiplicationKernel.cpp
@@ -124,7 +124,7 @@ inline std::pair<Status, Window> validate_and_configure_window(ITensorInfo *inpu
// Auto initialize output if not initialized
{
- set_shape_if_empty(*output, input1->tensor_shape());
+ ARM_COMPUTE_UNUSED(set_shape_if_empty(*output, input1->tensor_shape()));
if(input1->data_type() == DataType::S16 || input2->data_type() == DataType::S16)
{
@@ -711,8 +711,8 @@ void NEPixelWiseMultiplicationKernel::run(const Window &window, const ThreadInfo
{
(*_func_quantized)(input1.ptr(), input2.ptr(), output.ptr(), _scale,
_input1->info()->quantization_info().uniform(), _input2->info()->quantization_info().uniform(), _output->info()->quantization_info().uniform());
- collapsed.slide_window_slice_3D(slice_input1);
- collapsed.slide_window_slice_3D(slice_input2);
+ ARM_COMPUTE_UNUSED(collapsed.slide_window_slice_3D(slice_input1));
+ ARM_COMPUTE_UNUSED(collapsed.slide_window_slice_3D(slice_input2));
},
input1, input2, output);
}
@@ -721,8 +721,8 @@ void NEPixelWiseMultiplicationKernel::run(const Window &window, const ThreadInfo
execute_window_loop(collapsed, [&](const Coordinates &)
{
(*_func_int)(input1.ptr(), input2.ptr(), output.ptr(), _scale_exponent);
- collapsed.slide_window_slice_3D(slice_input1);
- collapsed.slide_window_slice_3D(slice_input2);
+ ARM_COMPUTE_UNUSED(collapsed.slide_window_slice_3D(slice_input1));
+ ARM_COMPUTE_UNUSED(collapsed.slide_window_slice_3D(slice_input2));
},
input1, input2, output);
}
@@ -732,8 +732,8 @@ void NEPixelWiseMultiplicationKernel::run(const Window &window, const ThreadInfo
execute_window_loop(collapsed, [&](const Coordinates &)
{
(*_func_float)(input1.ptr(), input2.ptr(), output.ptr(), _scale);
- collapsed.slide_window_slice_3D(slice_input1);
- collapsed.slide_window_slice_3D(slice_input2);
+ ARM_COMPUTE_UNUSED(collapsed.slide_window_slice_3D(slice_input1));
+ ARM_COMPUTE_UNUSED(collapsed.slide_window_slice_3D(slice_input2));
},
input1, input2, output);
}
diff --git a/src/core/NEON/kernels/NEROIPoolingLayerKernel.cpp b/src/core/NEON/kernels/NEROIPoolingLayerKernel.cpp
index b8d20f66bb..708420c67e 100644
--- a/src/core/NEON/kernels/NEROIPoolingLayerKernel.cpp
+++ b/src/core/NEON/kernels/NEROIPoolingLayerKernel.cpp
@@ -89,7 +89,7 @@ void NEROIPoolingLayerKernel::configure(const ITensor *input, const ITensor *roi
input->info()->valid_region().end(1));
AccessWindowStatic output_access(output->info(), 0, 0, pool_info.pooled_width(), pool_info.pooled_height());
- update_window_and_padding(window, input_access, output_access);
+ ARM_COMPUTE_UNUSED(update_window_and_padding(window, input_access, output_access));
output_access.set_valid_region(window, ValidRegion(Coordinates(), output->info()->tensor_shape()));
INEKernel::configure(window);
}
diff --git a/src/core/NEON/kernels/NESelectKernel.cpp b/src/core/NEON/kernels/NESelectKernel.cpp
index c03e5f0bca..72afe4f054 100644
--- a/src/core/NEON/kernels/NESelectKernel.cpp
+++ b/src/core/NEON/kernels/NESelectKernel.cpp
@@ -87,7 +87,7 @@ void select_op_8(const ITensor *cond, const ITensor *in1, const ITensor *in2, IT
const auto window_start_x = static_cast<int>(window.x().start());
const auto window_end_x = static_cast<int>(window.x().end());
- select_op<ScalarType, VectorType>(cond, in1, in2, out, window, window_step_x, window_start_x, window_end_x, window_end_x - window_step_x, [](const uint8_t *condition_ptr)
+ select_op<ScalarType, VectorType>(cond, in1, in2, out, window, window_step_x, window_start_x, window_end_x, window_end_x - window_step_x, [](const uint8_t *condition_ptr) -> VectorType
{
static const auto zero = wrapper::vdup_n(static_cast<uint8_t>(0), arm_compute::wrapper::traits::vector_128_tag());
return wrapper::vcgt(wrapper::vloadq(condition_ptr), zero);
@@ -101,7 +101,7 @@ void select_op_16(const ITensor *cond, const ITensor *in1, const ITensor *in2, I
const auto window_start_x = static_cast<int>(window.x().start());
const auto window_end_x = static_cast<int>(window.x().end());
- select_op<ScalarType, VectorType>(cond, in1, in2, out, window, window_step_x, window_start_x, window_end_x, window_end_x - window_step_x, [](const uint8_t *condition_ptr)
+ select_op<ScalarType, VectorType>(cond, in1, in2, out, window, window_step_x, window_start_x, window_end_x, window_end_x - window_step_x, [](const uint8_t *condition_ptr) -> VectorType
{
static const auto zero = wrapper::vdup_n(static_cast<uint16_t>(0), arm_compute::wrapper::traits::vector_128_tag());
return wrapper::vcgt(wrapper::vmovl(wrapper::vload(condition_ptr)), zero);
@@ -115,7 +115,7 @@ void select_op_32(const ITensor *cond, const ITensor *in1, const ITensor *in2, I
const auto window_start_x = static_cast<int>(window.x().start());
const auto window_end_x = static_cast<int>(window.x().end());
- select_op<ScalarType, VectorType>(cond, in1, in2, out, window, window_step_x, window_start_x, window_end_x, window_end_x - window_step_x, [](const uint8_t *condition_ptr)
+ select_op<ScalarType, VectorType>(cond, in1, in2, out, window, window_step_x, window_start_x, window_end_x, window_end_x - window_step_x, [](const uint8_t *condition_ptr) -> VectorType
{
static const auto zero = wrapper::vdup_n(static_cast<uint32_t>(0), arm_compute::wrapper::traits::vector_128_tag());
return wrapper::vcgt(wrapper::vmovl(wrapper::vgetlow(wrapper::vmovl(wrapper::vload(condition_ptr)))), zero);