Skip to content

Commit

Permalink
Minor updates based on clang-tidy feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
andreilitvin committed Feb 22, 2024
1 parent 25a8bcc commit d0a82ce
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/dnssd/minimal_mdns/core/RecordWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RecordWriter & RecordWriter::WriteQName(const FullQName & qname)
size_t qNameWriteStart = mOutput->WritePos();
bool isFullyCompressed = true;

for (uint16_t i = 0; i < qname.nameCount; i++)
for (uint16_t i = 0; i < static_cast<uint16_t>(qname.nameCount); i++)
{

// find out if the record part remaining already is located somewhere
Expand Down
2 changes: 1 addition & 1 deletion src/lib/shell/commands/Dns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class DnsShellResolverDelegate : public Dnssd::CommissioningResolveDelegate, pub
nodeData.resolutionData.isICDOperatingAsLIT.Value() ? "LIT" : "SIT");
}
streamer_printf(streamer_get(), " IP addresses:\r\n");
for (uint8_t i = 0; i < nodeData.resolutionData.numIPs; i++)
for (size_t i = 0; i < nodeData.resolutionData.numIPs; i++)
{
streamer_printf(streamer_get(), " %s\r\n", nodeData.resolutionData.ipAddress[i].ToString(ipAddressBuf));
}
Expand Down
1 change: 0 additions & 1 deletion src/lib/support/tests/TestIniEscaping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ void TestUnescaping(nlTestSuite * inSuite, void * inContext)
// Test valid cases
NL_TEST_ASSERT(inSuite, UnescapeKey("") == "");
NL_TEST_ASSERT(inSuite, UnescapeKey("abcd1234,!") == "abcd1234,!");
std::string out = UnescapeKey("abcd1234,!");
NL_TEST_ASSERT(inSuite, UnescapeKey("ab\\x0acd\\x20\\x3d12\\x5c34\\x7f") == "ab\ncd =12\\34\x7f");
NL_TEST_ASSERT(inSuite, UnescapeKey("\\x20") == " ");
NL_TEST_ASSERT(inSuite, UnescapeKey("\\x3d\\x3d\\x3d") == "===");
Expand Down

0 comments on commit d0a82ce

Please sign in to comment.