From aab82c5ebc5b65f5f5f657d7bee6bd60f106d3b9 Mon Sep 17 00:00:00 2001 From: Aron Virginas-Tar Date: Mon, 30 Sep 2019 14:21:26 +0100 Subject: [PATCH] IVGCVSW-3920 Fix build regression due to implicit conversion in ProfilingConnectionDumpToFileDecorator * Explicitly cast uint32_t to std::streamsize when using in sdt::ofstream::write() Signed-off-by: Aron Virginas-Tar Change-Id: I0f2989d2f8d077ae53b559c4029074a323d62f21 --- src/profiling/ProfilingConnectionDumpToFileDecorator.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp b/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp index b5400f2..cf42762 100644 --- a/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp +++ b/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp @@ -9,6 +9,8 @@ #include +#include + namespace armnn { @@ -98,12 +100,12 @@ void ProfilingConnectionDumpToFileDecorator::DumpIncomingToFile(const Packet& pa } // attempt to write binary data from packet - const unsigned int header = packet.GetHeader(); + const unsigned int header = packet.GetHeader(); const unsigned int packetLength = packet.GetLength(); m_IncomingDumpFileStream.write(reinterpret_cast(&header), sizeof header); m_IncomingDumpFileStream.write(reinterpret_cast(&packetLength), sizeof packetLength); - m_IncomingDumpFileStream.write(packet.GetData(), packetLength); + m_IncomingDumpFileStream.write(packet.GetData(), boost::numeric_cast(packetLength)); success &= m_IncomingDumpFileStream.good(); if (!(success || m_Settings.m_IgnoreFileErrors)) @@ -134,7 +136,7 @@ bool ProfilingConnectionDumpToFileDecorator::DumpOutgoingToFile(const char* buff } // attempt to write binary data - m_OutgoingDumpFileStream.write(buffer, length); + m_OutgoingDumpFileStream.write(buffer, boost::numeric_cast(length)); success &= m_OutgoingDumpFileStream.good(); if (!(success || m_Settings.m_IgnoreFileErrors)) { -- 2.7.4