From ae49533210e96bdee9c9479a7fa547f375a39c8b Mon Sep 17 00:00:00 2001 From: Chris Mumford Date: Wed, 22 May 2019 15:19:38 -0700 Subject: [PATCH] Add explicit typecasts to avoid compiler warning. Fixes issue #684. PiperOrigin-RevId: 249531001 --- util/status.cc | 4 ++-- 1 file 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(msg.size()); + const uint32_t len2 = static_cast(msg2.size()); const uint32_t size = len1 + (len2 ? (2 + len2) : 0); char* result = new char[size + 5]; memcpy(result, &size, sizeof(size));