aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-10-10 13:29:02 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-10-10 18:22:41 +0100
commit67ef2a52c3cdcc37538d77711bbcea2f0e5655e5 (patch)
tree8d25bcb2c10cba8945ae4638695d879e88b9d259 /src/profiling/ProfilingConnectionDumpToFileDecorator.cpp
parent8efc500a7465c03877db8bbe443134f2b1bbc1af (diff)
downloadarmnn-67ef2a52c3cdcc37538d77711bbcea2f0e5655e5.tar.gz
IVGCVSW-3964 Change the type held by the Packet class to unsigned char
* Updated the Packet class * Updated the pertinent code accordingly Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I73eab5b1ead67a610cd17fd33f8a74f764ad8cc4
Diffstat (limited to 'src/profiling/ProfilingConnectionDumpToFileDecorator.cpp')
-rw-r--r--src/profiling/ProfilingConnectionDumpToFileDecorator.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp b/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp
index 3d4b6bf927..d7915624f6 100644
--- a/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp
+++ b/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp
@@ -51,7 +51,7 @@ bool ProfilingConnectionDumpToFileDecorator::WritePacket(const unsigned char* bu
bool success = true;
if (m_Settings.m_DumpOutgoing)
{
- success &= DumpOutgoingToFile(reinterpret_cast<const char*>(buffer), length);
+ success &= DumpOutgoingToFile(buffer, length);
}
success &= m_Connection->WritePacket(buffer, length);
return success;
@@ -105,7 +105,8 @@ void ProfilingConnectionDumpToFileDecorator::DumpIncomingToFile(const Packet& pa
m_IncomingDumpFileStream.write(reinterpret_cast<const char*>(&header), sizeof header);
m_IncomingDumpFileStream.write(reinterpret_cast<const char*>(&packetLength), sizeof packetLength);
- m_IncomingDumpFileStream.write(packet.GetData(), boost::numeric_cast<std::streamsize>(packetLength));
+ m_IncomingDumpFileStream.write(reinterpret_cast<const char*>(packet.GetData()),
+ boost::numeric_cast<std::streamsize>(packetLength));
success &= m_IncomingDumpFileStream.good();
if (!(success || m_Settings.m_IgnoreFileErrors))
@@ -122,7 +123,7 @@ void ProfilingConnectionDumpToFileDecorator::DumpIncomingToFile(const Packet& pa
/// @param buffer pointer to data to write
/// @param length number of bytes to write
/// @return true if write successful, false otherwise
-bool ProfilingConnectionDumpToFileDecorator::DumpOutgoingToFile(const char* buffer, uint32_t length)
+bool ProfilingConnectionDumpToFileDecorator::DumpOutgoingToFile(const unsigned char* buffer, uint32_t length)
{
bool success = true;
if (!m_OutgoingDumpFileStream.is_open())
@@ -136,7 +137,8 @@ bool ProfilingConnectionDumpToFileDecorator::DumpOutgoingToFile(const char* buff
}
// attempt to write binary data
- m_OutgoingDumpFileStream.write(buffer, boost::numeric_cast<std::streamsize>(length));
+ m_OutgoingDumpFileStream.write(reinterpret_cast<const char*>(buffer),
+ boost::numeric_cast<std::streamsize>(length));
success &= m_OutgoingDumpFileStream.good();
if (!(success || m_Settings.m_IgnoreFileErrors))
{