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),