mirror of
https://github.com/espressif/openthread.git
synced 2026-08-21 18:09:52 +00:00
[clang-tidy] google-readability-casting (#5720)
This commit is contained in:
@@ -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,\
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user