aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-02-26 22:40:59 +0100
committerGitHub <noreply@github.com>2022-02-26 22:40:59 +0100
commit53a89f39683a68ff0c8a9650eb7edb1b37768d22 (patch)
tree025b56d1dd3d35ecd7a8335adcfe9ec5cf13f757 /searchlib
parentcd73549552e4b261f516d361a3c16bee4af1e70c (diff)
parent912ce49ce344a05cf245e9591d385ab7046cc79e (diff)
Merge pull request #21429 from vespa-engine/toregge/remove-array-bounds-warning-in-searchlib
Remove array-bounds warning (searchlib).
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/tests/bitcompression/expgolomb/expgolomb_test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/searchlib/src/tests/bitcompression/expgolomb/expgolomb_test.cpp b/searchlib/src/tests/bitcompression/expgolomb/expgolomb_test.cpp
index a1a74a1d68c..1ee4e9614e0 100644
--- a/searchlib/src/tests/bitcompression/expgolomb/expgolomb_test.cpp
+++ b/searchlib/src/tests/bitcompression/expgolomb/expgolomb_test.cpp
@@ -205,7 +205,12 @@ public:
void addConstKFactory(int kValue, IDecodeFuncFactory factory) {
(void) kValue;
assert(static_cast<unsigned int>(kValue) == _constK.size());
+#pragma GCC diagnostic push
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 12
+#pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
_constK.push_back(factory);
+#pragma GCC diagnostic pop
}
IDecodeFuncFactory getConstKFactory(int kValue) const {