summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2021-02-19 08:47:00 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-02-19 15:28:41 +0000
commit60548a8992e19af9d9fa1bacb71b74204e9d797d (patch)
tree109e2d7bc08f60952309fb8f087db9f8f4529b7e /src/mongo/db/storage
parent822232665be8d186ae5801659221197a19180aef (diff)
downloadmongo-60548a8992e19af9d9fa1bacb71b74204e9d797d.tar.gz
SERVER-53990 fix unittests
Diffstat (limited to 'src/mongo/db/storage')
-rw-r--r--src/mongo/db/storage/key_string_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/storage/key_string_test.cpp b/src/mongo/db/storage/key_string_test.cpp
index c967916d160..9a3093f4f93 100644
--- a/src/mongo/db/storage/key_string_test.cpp
+++ b/src/mongo/db/storage/key_string_test.cpp
@@ -1484,10 +1484,10 @@ TEST_F(KeyStringBuilderTest, RecordIds) {
TEST_F(KeyStringBuilderTest, RecordIdStr) {
const int kSize = 12;
for (int i = 0; i < kSize; i++) {
- char buf[kSize];
+ unsigned char buf[kSize];
memset(buf, 0x80, kSize);
buf[i] = 0xFE;
- const RecordId rid = RecordId(buf, kSize);
+ const RecordId rid = RecordId(reinterpret_cast<char*>(buf), kSize);
{ // Test encoding / decoding of single RecordIds
const KeyString::Builder ks(version, rid);
@@ -1522,9 +1522,9 @@ TEST_F(KeyStringBuilderTest, RecordIdStr) {
}
for (int j = 0; j < kSize; j++) {
- char otherBuf[kSize] = {0};
+ unsigned char otherBuf[kSize] = {0};
otherBuf[j] = 0xFE;
- RecordId other = RecordId(otherBuf, kSize);
+ RecordId other = RecordId(reinterpret_cast<char*>(otherBuf), kSize);
if (rid == other) {
ASSERT_EQ(KeyString::Builder(version, rid), KeyString::Builder(version, other));