diff options
author | Andrew Morrow <acm@mongodb.com> | 2021-09-28 13:14:24 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-09-30 14:06:24 +0000 |
commit | 5b74cda8ddbcf04ed957b198dc8a06776f1a278e (patch) | |
tree | 50e76f7688ff88c54509ca047290c757c599d6e2 /src/mongo/db/exec | |
parent | 21327c2dee22aee10e7847059c43dbd7d1352654 (diff) | |
download | mongo-5b74cda8ddbcf04ed957b198dc8a06776f1a278e.tar.gz |
SERVER-59234 Work around GCC 11 C++20 mode stringop-overread warning
Diffstat (limited to 'src/mongo/db/exec')
-rw-r--r-- | src/mongo/db/exec/sbe/values/value.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/exec/sbe/values/value.h b/src/mongo/db/exec/sbe/values/value.h index c565be7f644..ebcf4c1a5c0 100644 --- a/src/mongo/db/exec/sbe/values/value.h +++ b/src/mongo/db/exec/sbe/values/value.h @@ -1215,8 +1215,8 @@ inline SortSpec* getSortSpecView(Value val) noexcept { struct BsonRegex { explicit BsonRegex(const char* rawValue) { pattern = rawValue; - // Add sizeof(char) to account for the NULL byte after 'pattern'. - flags = pattern.rawData() + pattern.size() + sizeof(char); + // Add one to account for the NULL byte after 'pattern'. + flags = rawValue + (pattern.size() + 1); } size_t byteSize() const { |