diff options
author | Rob Hughes <robert.hughes@arm.com> | 2020-05-20 15:27:37 +0100 |
---|---|---|
committer | Rob Hughes <robert.hughes@arm.com> | 2020-06-02 13:55:30 +0000 |
commit | bb46dde88befe14583eaac83f65775a7543d4586 (patch) | |
tree | 61baff7d93acd0a24184bc0dfa8af540168e1e4c /src/profiling/test | |
parent | 8acafd13ad2169b6edc86f5e42602ec604d39648 (diff) | |
download | armnn-bb46dde88befe14583eaac83f65775a7543d4586.tar.gz |
Fix a few build warnings:
* Remove redundant asserts for unsigned ints being positive
* Remove unneeded include of lightweight_test.hpp header
* Remove unused exception variable names
* Replace hardcoded 0.0f with T() for some template functions
* Add a few static_casts
Change-Id: I290b0433cf995f6d0199422eaa10f816e5fd8eb9
Signed-off-by: Robert Hughes <robert.hughes@arm.com>
Diffstat (limited to 'src/profiling/test')
-rw-r--r-- | src/profiling/test/ProfilingMocks.hpp | 8 | ||||
-rw-r--r-- | src/profiling/test/SendCounterPacketTests.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/profiling/test/ProfilingMocks.hpp b/src/profiling/test/ProfilingMocks.hpp index 2cd44c40a2..28e410fb9a 100644 --- a/src/profiling/test/ProfilingMocks.hpp +++ b/src/profiling/test/ProfilingMocks.hpp @@ -111,12 +111,12 @@ public: if(packetInfo.second != 0) { - return std::count(m_WrittenData.begin(), m_WrittenData.end(), packetInfo); + return static_cast<long>(std::count(m_WrittenData.begin(), m_WrittenData.end(), packetInfo)); } else { - return std::count_if(m_WrittenData.begin(), m_WrittenData.end(), - [&packetInfo](const std::pair<PacketType, uint32_t> pair) { return packetInfo.first == pair.first; }); + return static_cast<long>(std::count_if(m_WrittenData.begin(), m_WrittenData.end(), + [&packetInfo](const std::pair<PacketType, uint32_t> pair) { return packetInfo.first == pair.first; })); } } @@ -142,7 +142,7 @@ public: { std::lock_guard<std::mutex> lock(m_Mutex); - return m_WrittenData.size(); + return static_cast<unsigned long>(m_WrittenData.size()); } void Clear() diff --git a/src/profiling/test/SendCounterPacketTests.cpp b/src/profiling/test/SendCounterPacketTests.cpp index e7e2312cb4..dc9671bcc8 100644 --- a/src/profiling/test/SendCounterPacketTests.cpp +++ b/src/profiling/test/SendCounterPacketTests.cpp @@ -2273,7 +2273,7 @@ BOOST_AUTO_TEST_CASE(SendThreadSendStreamMetadataPacket3) // Check that the buffer contains at least one Stream Metadata packet and no other packets const auto writtenDataSize = mockProfilingConnection.GetWrittenDataSize(); - BOOST_TEST(writtenDataSize >= 1); + BOOST_TEST(writtenDataSize >= 1u); BOOST_TEST(mockProfilingConnection.CheckForPacket( {PacketType::StreamMetaData, streamMetadataPacketsize}) == writtenDataSize); } @@ -2319,7 +2319,7 @@ BOOST_AUTO_TEST_CASE(SendThreadSendStreamMetadataPacket4) // Check that the buffer contains at least one Stream Metadata packet and no other packets const auto writtenDataSize = mockProfilingConnection.GetWrittenDataSize(); - BOOST_TEST(writtenDataSize >= 1); + BOOST_TEST(writtenDataSize >= 1u); BOOST_TEST(mockProfilingConnection.CheckForPacket( {PacketType::StreamMetaData, streamMetadataPacketsize}) == writtenDataSize); } |