Skip to content

Commit

Permalink
adding a cast to tests for (NodeId) for clang++.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marty Leisner authored and Marty Leisner committed Aug 19, 2021
1 parent f1cbf34 commit 501d9b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/mdns/tests/TestMdnsCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void TestInsert(nlTestSuite * inSuite, void * inContext)
CHIP_ERROR result;

// ml -- why doesn't adding 2 uint16_t give a uint16_t?
peerId.SetNodeId(id + i);
peerId.SetNodeId((NodeId) id + i);
result = tMdnsCache.Insert(peerId, addr, (uint16_t)(port + i), iface, 1000 * ttl);
if (i < sizeOfCache)
{
Expand All @@ -89,7 +89,7 @@ void TestInsert(nlTestSuite * inSuite, void * inContext)
{
CHIP_ERROR result;

peerId.SetNodeId(id + i);
peerId.SetNodeId((NodeId) id + i);
result = tMdnsCache.Insert(peerId, addr, (uint16_t)(port + i), iface, 1000 * ttl);
NL_TEST_ASSERT(inSuite, result == CHIP_NO_ERROR);
}
Expand All @@ -99,7 +99,7 @@ void TestInsert(nlTestSuite * inSuite, void * inContext)
{
CHIP_ERROR result;

peerId.SetNodeId(id + i);
peerId.SetNodeId((NodeId) id + i);
result = tMdnsCache.Delete(peerId);
NL_TEST_ASSERT(inSuite, result == CHIP_NO_ERROR);
}
Expand All @@ -113,7 +113,7 @@ void TestInsert(nlTestSuite * inSuite, void * inContext)
{
CHIP_ERROR result;

peerId.SetNodeId(id + i);
peerId.SetNodeId((NodeId) id + i);
result = tMdnsCache.Insert(peerId, addrV6, (uint16_t)(port + i), iface, 1000 * ttl);
NL_TEST_ASSERT(inSuite, result == CHIP_NO_ERROR);
}
Expand Down

0 comments on commit 501d9b2

Please sign in to comment.