From 270233fc7c57486026f381cd8ba6a71b84d7be2d Mon Sep 17 00:00:00 2001 From: Rob Hughes Date: Wed, 13 Nov 2019 11:53:48 +0000 Subject: Fix a few compile errors: * Replace use of non-standard integral types (e.g. u_char) * Convert boost::filesystem::paths to std::strings using the .string() method rather than .c_str(), because on Windows .c_str() returns a wide character string, which is not convertible to a std::string. Change-Id: Ia86b0653697033bb1afa01e64b5b2103dd042ffd Signed-off-by: Robert Hughes --- src/profiling/DirectoryCaptureCommandHandler.cpp | 2 +- src/profiling/test/FileOnlyProfilingDecoratorTests.cpp | 8 ++++---- .../test/ProfilingConnectionDumpToFileDecoratorTests.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/profiling/DirectoryCaptureCommandHandler.cpp b/src/profiling/DirectoryCaptureCommandHandler.cpp index c5a2d97293..65a7880d50 100644 --- a/src/profiling/DirectoryCaptureCommandHandler.cpp +++ b/src/profiling/DirectoryCaptureCommandHandler.cpp @@ -320,7 +320,7 @@ const ICounterDirectory& DirectoryCaptureCommandHandler::GetCounterDirectory() c std::string DirectoryCaptureCommandHandler::GetStringNameFromBuffer(const unsigned char* const data, uint32_t offset) { std::string deviceName; - u_char nextChar = profiling::ReadUint8(data, offset); + uint8_t nextChar = profiling::ReadUint8(data, offset); while (isprint(nextChar)) { diff --git a/src/profiling/test/FileOnlyProfilingDecoratorTests.cpp b/src/profiling/test/FileOnlyProfilingDecoratorTests.cpp index 9bf177c096..5524ed4fbf 100644 --- a/src/profiling/test/FileOnlyProfilingDecoratorTests.cpp +++ b/src/profiling/test/FileOnlyProfilingDecoratorTests.cpp @@ -35,7 +35,7 @@ BOOST_AUTO_TEST_CASE(DumpOutgoingValidFileEndToEnd) options.m_EnableProfiling = true; options.m_FileOnly = true; options.m_IncomingCaptureFile = ""; - options.m_OutgoingCaptureFile = tempPath.c_str(); + options.m_OutgoingCaptureFile = tempPath.string(); options.m_CapturePeriod = 100; // Enable the profiling service @@ -45,9 +45,9 @@ BOOST_AUTO_TEST_CASE(DumpOutgoingValidFileEndToEnd) profilingService.Update(); profilingService.Update(); - u_int32_t timeout = 2000; - u_int32_t sleepTime = 50; - u_int32_t timeSlept = 0; + uint32_t timeout = 2000; + uint32_t sleepTime = 50; + uint32_t timeSlept = 0; // Give the profiling service sending thread time start executing and send the stream metadata. while (profilingService.GetCurrentState() != ProfilingState::WaitingForAck) diff --git a/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp b/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp index c393ec9b07..6a092815b2 100644 --- a/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp +++ b/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp @@ -100,7 +100,7 @@ BOOST_AUTO_TEST_CASE(DumpIncomingValidFile) boost::filesystem::temp_directory_path() / boost::filesystem::unique_path(); armnn::Runtime::CreationOptions::ExternalProfilingOptions options; - options.m_IncomingCaptureFile = fileName.c_str(); + options.m_IncomingCaptureFile = fileName.string(); options.m_OutgoingCaptureFile = ""; ProfilingConnectionDumpToFileDecorator decorator(std::make_unique(), options, false); @@ -149,7 +149,7 @@ BOOST_AUTO_TEST_CASE(DumpOutgoingValidFile) armnn::Runtime::CreationOptions::ExternalProfilingOptions options; options.m_IncomingCaptureFile = ""; - options.m_OutgoingCaptureFile = fileName.c_str(); + options.m_OutgoingCaptureFile = fileName.string(); ProfilingConnectionDumpToFileDecorator decorator(std::make_unique(), options, false); -- cgit v1.2.1