diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-06-22 16:35:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-22 16:35:41 +0200 |
commit | 9e4bd5fc8e348a8fe25d47b505b2cb5efe7d7c7f (patch) | |
tree | 89c15dbb8528322439dfbc3565d546fc6787ee25 /vespalib | |
parent | c947ce8f8161cc75525cab18a7522dc1483c3a26 (diff) | |
parent | f96a1f35d638c80b61e8b0fedfc48c10de8ca0c7 (diff) |
Merge pull request #23202 from vespa-engine/toregge/remove-array-bounds-warning-in-vespalib
Remove array-bounds warning (vespalib).
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/util/shared_string_repo.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vespalib/src/vespa/vespalib/util/shared_string_repo.h b/vespalib/src/vespa/vespalib/util/shared_string_repo.h index 353e4fd1ca4..7ed50bf0858 100644 --- a/vespalib/src/vespa/vespalib/util/shared_string_repo.h +++ b/vespalib/src/vespa/vespalib/util/shared_string_repo.h @@ -215,7 +215,12 @@ private: string_id resolve(vespalib::stringref str) { uint32_t direct_id = try_make_direct_id(str); if (direct_id >= ID_BIAS) { +#pragma GCC diagnostic push +#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 12 +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif uint64_t full_hash = XXH3_64bits(str.data(), str.size()); +#pragma GCC diagnostic pop uint32_t part = full_hash & PART_MASK; uint32_t local_hash = full_hash >> PART_BITS; uint32_t local_idx = _partitions[part].resolve(AltKey{str, local_hash}); |