From fae513c5585b9ba09c3aa8bfd4f7119208b7b5f9 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Wed, 16 Oct 2019 17:41:33 +0100 Subject: COMPMID-2486: Remove/add disabled compiler warnings Removed the following flags: -Wno-vla -Wno-strict-overflow Added: -Wformat-security Change-Id: I49eb3d724e14db796e543164295674617c37cb65 Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/2109 Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Reviewed-by: Michele Di Giorgio --- src/core/utils/helpers/tensor_transform.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/core/utils/helpers/tensor_transform.cpp') diff --git a/src/core/utils/helpers/tensor_transform.cpp b/src/core/utils/helpers/tensor_transform.cpp index f6a54a59ee..cd874b24b3 100644 --- a/src/core/utils/helpers/tensor_transform.cpp +++ b/src/core/utils/helpers/tensor_transform.cpp @@ -88,7 +88,14 @@ int calculate_end_on_index(TensorShape input_shape, int index, int start_on_inde // Shrink dimension if(shrink_axis) { - stop = start_on_index + 1; + if(start_on_index == std::numeric_limits::max()) + { + stop = start_on_index; + } + else + { + stop = start_on_index + 1; + } } // Reset in case of begin mask present -- cgit v1.2.1