From e2e2b58eecfe4f1024d20016485afb0ae689d505 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Wed, 18 Dec 2019 17:59:23 +0000 Subject: [PATCH] Reduced warnings in unit tests for CLang --- test/test_array_wrapper.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/test_array_wrapper.cpp b/test/test_array_wrapper.cpp index 461f3190..4d5c5e2a 100644 --- a/test/test_array_wrapper.cpp +++ b/test/test_array_wrapper.cpp @@ -30,6 +30,9 @@ SOFTWARE. #include "etl/array_wrapper.h" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warray-bounds" + namespace { int data5[] = { 0, 1, 2, 3, 4 }; @@ -560,9 +563,12 @@ namespace size_t compare_hash = etl::private_hash::generic_hash(reinterpret_cast(&data5[0]), reinterpret_cast(&data5[5])); - - + + CHECK_EQUAL(compare_hash, hash); } }; } + +#pragma clang diagnostic pop +