This is an automated email from the ASF dual-hosted git repository.

jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/develop by this push:
     new cd17843  GEODE-7944: Fixes type mistmatch
cd17843 is described below

commit cd178433e0a7a1c36752845d3e17fced56f56b22
Author: Jacob Barrett <[email protected]>
AuthorDate: Wed Apr 29 23:37:47 2020 -0700

    GEODE-7944: Fixes type mistmatch
    
    * size_t can't implicitly cast to int32_t on MSVC.
---
 cppcache/src/QueueConnectionRequest.cpp | 2 +-
 cppcache/src/TcrConnection.cpp          | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cppcache/src/QueueConnectionRequest.cpp 
b/cppcache/src/QueueConnectionRequest.cpp
index 98e024d..a83b1fc 100644
--- a/cppcache/src/QueueConnectionRequest.cpp
+++ b/cppcache/src/QueueConnectionRequest.cpp
@@ -30,7 +30,7 @@ void QueueConnectionRequest::toData(DataOutput& output) const 
{
   output.write(static_cast<int8_t>(DSCode::ClientProxyMembershipId));
   const auto& dsMemberId = m_membershipID.getDSMemberId();
   output.writeBytes(reinterpret_cast<const uint8_t*>(dsMemberId.c_str()),
-                    dsMemberId.size());
+                    static_cast<int32_t>(dsMemberId.size()));
   output.writeInt(static_cast<int32_t>(1));
   output.writeInt(static_cast<int32_t>(m_redundantCopies));
   writeSetOfServerLocation(output);
diff --git a/cppcache/src/TcrConnection.cpp b/cppcache/src/TcrConnection.cpp
index 783984f..a31871b 100644
--- a/cppcache/src/TcrConnection.cpp
+++ b/cppcache/src/TcrConnection.cpp
@@ -161,7 +161,7 @@ bool TcrConnection::initTcrConnection(
     const auto& dsMemberId = memId->getDSMemberId();
     handShakeMsg.writeBytes(
         reinterpret_cast<const uint8_t*>(dsMemberId.c_str()),
-        dsMemberId.size());
+        static_cast<int32_t>(dsMemberId.size()));
   } else {
     ACE_TCHAR hostName[256];
     ACE_OS::hostname(hostName, sizeof(hostName) - 1);
@@ -181,7 +181,7 @@ bool TcrConnection::initTcrConnection(
     const auto& dsMemberId = memId->getDSMemberId();
     handShakeMsg.writeBytes(
         reinterpret_cast<const uint8_t*>(dsMemberId.c_str()),
-        dsMemberId.size());
+        static_cast<int32_t>(dsMemberId.size()));
   }
   handShakeMsg.writeInt(static_cast<int32_t>(1));
 

Reply via email to