[clang-tidy] google-readability-casting (#5720)

This commit is contained in:
Jonathan Hui
2020-10-27 21:41:37 -07:00
committed by GitHub
parent 5c5d5f4dd9
commit 7fe84c59cd
4 changed files with 7 additions and 5 deletions
+1
View File
@@ -116,6 +116,7 @@ readonly OT_CLANG_TIDY_BUILD_OPTS=(
readonly OT_CLANG_TIDY_CHECKS="\
-*,\
google-readability-casting,\
modernize-use-bool-literals,\
modernize-use-equals-default,\
modernize-use-equals-delete,\
+4 -3
View File
@@ -384,11 +384,12 @@ otError CoapSecure::ProcessX509(uint8_t aArgsLength, char *aArgs[])
OT_UNUSED_VARIABLE(aArgsLength);
OT_UNUSED_VARIABLE(aArgs);
otCoapSecureSetCertificate(mInterpreter.mInstance, (const uint8_t *)OT_CLI_COAPS_X509_CERT,
sizeof(OT_CLI_COAPS_X509_CERT), (const uint8_t *)OT_CLI_COAPS_PRIV_KEY,
otCoapSecureSetCertificate(mInterpreter.mInstance, reinterpret_cast<const uint8_t *>(OT_CLI_COAPS_X509_CERT),
sizeof(OT_CLI_COAPS_X509_CERT), reinterpret_cast<const uint8_t *>(OT_CLI_COAPS_PRIV_KEY),
sizeof(OT_CLI_COAPS_PRIV_KEY));
otCoapSecureSetCaCertificateChain(mInterpreter.mInstance, (const uint8_t *)OT_CLI_COAPS_TRUSTED_ROOT_CERTIFICATE,
otCoapSecureSetCaCertificateChain(mInterpreter.mInstance,
reinterpret_cast<const uint8_t *>(OT_CLI_COAPS_TRUSTED_ROOT_CERTIFICATE),
sizeof(OT_CLI_COAPS_TRUSTED_ROOT_CERTIFICATE));
mUseCertificate = true;
+1 -1
View File
@@ -126,7 +126,7 @@ uint32_t RandomManager::NonCryptoPrng::GetNext(void)
uint32_t mlcg, p, q;
uint64_t tmpstate;
tmpstate = (uint64_t)33614 * (uint64_t)mState;
tmpstate = static_cast<uint64_t>(33614) * static_cast<uint64_t>(mState);
q = tmpstate & 0xffffffff;
q = q >> 1;
p = tmpstate >> 32;
+1 -1
View File
@@ -111,7 +111,7 @@ void TestLinkQualityData(RssTestData aRssData)
VerifyOrQuit(ave >= min, "TestLinkQualityInfo failed - GetAverageRss() is smaller than min value.");
VerifyOrQuit(ave <= max, "TestLinkQualityInfo failed - GetAverageRss() is larger than min value");
VerifyRawRssValue(linkInfo.GetAverageRss(), linkInfo.GetAverageRssRaw());
printf("%02u) AddRss(%4d): ", (unsigned int)i, rss);
printf("%02u) AddRss(%4d): ", static_cast<unsigned int>(i), rss);
PrintOutcome(linkInfo);
}