From 3c03385bef4c4e12f84cc3a585ec06f1b311578c Mon Sep 17 00:00:00 2001 From: silabs-PiyushY Date: Tue, 7 Jul 2026 23:54:13 +0530 Subject: [PATCH] [build] fix LLVM compilation issues (#13058) - Fix Clang -Wshorten-64-to-32 in mac_frame.cpp and cli_ping.cpp --- examples/platforms/utils/mac_frame.cpp | 3 ++- src/cli/cli_ping.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/platforms/utils/mac_frame.cpp b/examples/platforms/utils/mac_frame.cpp index 20ff613ff..e73f3eeea 100644 --- a/examples/platforms/utils/mac_frame.cpp +++ b/examples/platforms/utils/mac_frame.cpp @@ -406,7 +406,8 @@ otError otMacFrameProcessTxSfd(otRadioFrame *aFrame, uint64_t aRadioTime, otRadi #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE if (static_cast(aFrame)->Has()) // CSL IE should be filled for every transmit attempt { - otMacFrameSetCslIe(aFrame, aRadioContext->mCslPeriod, ComputeCslPhase(aRadioTime, aRadioContext)); + otMacFrameSetCslIe(aFrame, aRadioContext->mCslPeriod, + ComputeCslPhase(static_cast(aRadioTime), aRadioContext)); } #endif #if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE diff --git a/src/cli/cli_ping.cpp b/src/cli/cli_ping.cpp index af243f62b..7ee217720 100644 --- a/src/cli/cli_ping.cpp +++ b/src/cli/cli_ping.cpp @@ -233,8 +233,8 @@ void PingSender::HandlePingStatistics(const otPingSenderStatistics *aStatistics) if (aStatistics->mReceivedCount != 0) { - uint32_t avgRoundTripTime = - 1000 * static_cast(aStatistics->mTotalRoundTripTime) / aStatistics->mReceivedCount; + uint32_t avgRoundTripTime = static_cast( + 1000 * static_cast(aStatistics->mTotalRoundTripTime) / aStatistics->mReceivedCount); OutputFormat(" Round-trip min/avg/max = %u/%u.%03u/%u ms.", aStatistics->mMinRoundTripTime, static_cast(avgRoundTripTime / 1000), static_cast(avgRoundTripTime % 1000),