diff options
author | Chris Mumford <cmumford@google.com> | 2019-05-22 15:19:38 -0700 |
---|---|---|
committer | Victor Costan <pwnall@chromium.org> | 2019-05-24 14:49:37 -0700 |
commit | ae49533210e96bdee9c9479a7fa547f375a39c8b (patch) | |
tree | 7c2932b2813ea64f2b2808903470b0cbde106497 /util | |
parent | c00e177f3613068eda4bff4abfbd3bd4165a86e8 (diff) | |
download | leveldb-ae49533210e96bdee9c9479a7fa547f375a39c8b.tar.gz |
Add explicit typecasts to avoid compiler warning.
Fixes issue #684.
PiperOrigin-RevId: 249531001
Diffstat (limited to 'util')
-rw-r--r-- | util/status.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/status.cc b/util/status.cc index 6ca8da6..15ce747 100644 --- a/util/status.cc +++ b/util/status.cc @@ -20,8 +20,8 @@ const char* Status::CopyState(const char* state) { Status::Status(Code code, const Slice& msg, const Slice& msg2) { assert(code != kOk); - const uint32_t len1 = msg.size(); - const uint32_t len2 = msg2.size(); + const uint32_t len1 = static_cast<uint32_t>(msg.size()); + const uint32_t len2 = static_cast<uint32_t>(msg2.size()); const uint32_t size = len1 + (len2 ? (2 + len2) : 0); char* result = new char[size + 5]; memcpy(result, &size, sizeof(size)); |