aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/grouping
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2021-02-21 17:26:17 +0100
committerTor Egge <Tor.Egge@broadpark.no>2021-02-21 17:26:17 +0100
commit5cbb37f3d2c86a545d1ebf8abe0a56fedaf0183c (patch)
treee3d83d13c65cbcaa9d3833395d2c6f8dfaf5226d /searchlib/src/tests/grouping
parente4d417a2a1423aaab5d0b1b00369fb4fbe7757b3 (diff)
Eliminate array bounds warning.
Diffstat (limited to 'searchlib/src/tests/grouping')
-rw-r--r--searchlib/src/tests/grouping/sketch_test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/searchlib/src/tests/grouping/sketch_test.cpp b/searchlib/src/tests/grouping/sketch_test.cpp
index 5fb4071f57d..13c0641118c 100644
--- a/searchlib/src/tests/grouping/sketch_test.cpp
+++ b/searchlib/src/tests/grouping/sketch_test.cpp
@@ -26,7 +26,12 @@ TEST("require that normal sketch is initialized") {
template <typename NormalSketch>
void checkBucketValue(NormalSketch &sketch, size_t bucket, uint32_t value) {
+#pragma GCC diagnostic push
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 11
+#pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
EXPECT_EQUAL(value, static_cast<size_t>(sketch.bucket[bucket]));
+#pragma GCC diagnostic pop
}
template <int BucketBits, typename HashT>