aboutsummaryrefslogtreecommitdiffstats
path: root/remote-processor/Message.cpp
diff options
context:
space:
mode:
authorPatrick Benavoli <patrick.benavoli@intel.com>2014-07-23 01:27:00 +0200
committerEric Laurent <elaurent@google.com>2015-04-24 13:39:13 -0700
commit911844b16c6b627f421bc3368de427de3ca9f60c (patch)
tree223697b3ea168eca090cd06a673c7dbb7dea27de /remote-processor/Message.cpp
parent9ad87f08eb4cfa8752f4b9e7b9deb3bd219ff591 (diff)
downloadexternal_parameter-framework-911844b16c6b627f421bc3368de427de3ca9f60c.zip
external_parameter-framework-911844b16c6b627f421bc3368de427de3ca9f60c.tar.gz
external_parameter-framework-911844b16c6b627f421bc3368de427de3ca9f60c.tar.bz2
Type mismatch corrections (Windows 64 bits)
This patch removes the type mismatch warnings revealed by Windows 64 compiler. Wherever necessary, used size_t type for size related data. Change-Id: Ie045ce95940cd83fe8d681168ac9526fc6028d43 Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
Diffstat (limited to 'remote-processor/Message.cpp')
-rw-r--r--remote-processor/Message.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/remote-processor/Message.cpp b/remote-processor/Message.cpp
index 8521117..2662e3d 100644
--- a/remote-processor/Message.cpp
+++ b/remote-processor/Message.cpp
@@ -57,7 +57,7 @@ uint8_t CMessage::getMsgId() const
}
// Data
-void CMessage::writeData(const void* pvData, uint32_t uiSize)
+void CMessage::writeData(const void* pvData, size_t uiSize)
{
assert(_uiIndex + uiSize <= _uiDataSize);
@@ -68,7 +68,7 @@ void CMessage::writeData(const void* pvData, uint32_t uiSize)
_uiIndex += uiSize;
}
-void CMessage::readData(void* pvData, uint32_t uiSize)
+void CMessage::readData(void* pvData, size_t uiSize)
{
assert(_uiIndex + uiSize <= _uiDataSize);
@@ -110,14 +110,14 @@ void CMessage::readString(string& strData)
strData = pcData;
}
-uint32_t CMessage::getStringSize(const string& strData) const
+size_t CMessage::getStringSize(const string& strData) const
{
// Return string length plus room to store its length
return strData.length() + sizeof(uint32_t);
}
// Remaining data size
-uint32_t CMessage::getRemainingDataSize() const
+size_t CMessage::getRemainingDataSize() const
{
return _uiDataSize - _uiIndex;
}
@@ -148,7 +148,7 @@ CMessage::Result CMessage::serialize(CSocket* pSocket, bool bOut, string& strErr
}
// Size
- uint32_t uiSize = sizeof(_ucMsgId) + _uiDataSize;
+ uint32_t uiSize = (uint32_t)(sizeof(_ucMsgId) + _uiDataSize);
if (!pSocket->write(&uiSize, sizeof(uiSize))) {
@@ -264,8 +264,8 @@ uint8_t CMessage::computeChecksum() const
return uiChecksum;
}
-// Data allocation
-void CMessage::allocateData(uint32_t uiSize)
+// Allocation of room to store the message
+void CMessage::allocateData(size_t uiSize)
{
// Remove previous one
if (_pucData) {