diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-10-16 17:41:33 +0100 |
---|---|---|
committer | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-10-17 15:36:33 +0000 |
commit | fae513c5585b9ba09c3aa8bfd4f7119208b7b5f9 (patch) | |
tree | 4c87da93a765e880d22a53904543e2e91660f7a5 /tests/AssetsLibrary.h | |
parent | ebaddb600795911dc4e4c446d4f612caa009aaa1 (diff) | |
download | ComputeLibrary-fae513c5585b9ba09c3aa8bfd4f7119208b7b5f9.tar.gz |
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 <michalis.spyrou@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2109
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'tests/AssetsLibrary.h')
-rw-r--r-- | tests/AssetsLibrary.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/AssetsLibrary.h b/tests/AssetsLibrary.h index a512dab36b..f535f16303 100644 --- a/tests/AssetsLibrary.h +++ b/tests/AssetsLibrary.h @@ -491,12 +491,12 @@ template <typename T, typename D> void AssetsLibrary::fill_boxes(T &&tensor, D &&distribution, std::random_device::result_type seed_offset) const { using ResultType = typename std::remove_reference<D>::type::result_type; - std::mt19937 gen(_seed + seed_offset); - TensorShape shape(tensor.shape()); - const int num_boxes = tensor.num_elements() / 4; + std::mt19937 gen(_seed + seed_offset); + TensorShape shape(tensor.shape()); + const uint32_t num_boxes = tensor.num_elements() / 4; // Iterate over all elements std::uniform_real_distribution<> size_dist(0.f, 1.f); - for(int element_idx = 0; element_idx < num_boxes * 4; element_idx += 4) + for(uint32_t element_idx = 0; element_idx < num_boxes * 4; element_idx += 4) { const ResultType delta = size_dist(gen); const ResultType epsilon = size_dist(gen); @@ -538,7 +538,8 @@ void AssetsLibrary::fill(T &&tensor, D &&distribution, std::random_device::resul } // Iterate over all elements - for(int element_idx = 0; element_idx < tensor.num_elements(); ++element_idx) + const uint32_t num_elements = tensor.num_elements(); + for(uint32_t element_idx = 0; element_idx < num_elements; ++element_idx) { Coordinates id = index2coord(shape, element_idx); |