mirror of
https://github.com/espressif/openthread.git
synced 2026-09-17 22:50:07 +00:00
[build] add format-nonliteral to missed code (#12251)
This commit enables the format-nonliteral check for code missed in `#12236`. This commit also enables the format-nonliteral warnings in CMake to catch such warnings in future in CMake build.
This commit is contained in:
@@ -47,6 +47,10 @@ if(OT_RTT_UART)
|
||||
)
|
||||
endif()
|
||||
|
||||
target_compile_options(openthread-platform-utils PRIVATE
|
||||
${OT_CFLAGS}
|
||||
)
|
||||
|
||||
target_include_directories(openthread-platform-utils PRIVATE
|
||||
${OT_PUBLIC_INCLUDES}
|
||||
$<TARGET_PROPERTY:ot-config,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
|
||||
@@ -124,7 +124,8 @@ void utilsLogRttDeinit(void);
|
||||
* @param[in] aFormat A pointer to the format string.
|
||||
* @param[in] ap va_list matching information for aFormat
|
||||
*/
|
||||
void utilsLogRttOutput(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap);
|
||||
void utilsLogRttOutput(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap)
|
||||
OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(3, 0);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
||||
@@ -383,6 +383,7 @@ void otMacFrameUpdateTimeIe(otRadioFrame *aFrame, uint64_t aRadioTime, otRadioCo
|
||||
uint8_t *timeIe;
|
||||
uint64_t time;
|
||||
|
||||
OT_UNUSED_VARIABLE(aRadioContext);
|
||||
VerifyOrExit((aFrame->mInfo.mTxInfo.mIeInfo != nullptr) && (aFrame->mInfo.mTxInfo.mIeInfo->mTimeIeOffset != 0));
|
||||
|
||||
timeIe = aFrame->mPsdu + aFrame->mInfo.mTxInfo.mIeInfo->mTimeIeOffset;
|
||||
@@ -434,7 +435,6 @@ bool otMacFrameSrcAddrMatchCslReceiverPeer(const otRadioFrame *aFrame, const otR
|
||||
break;
|
||||
|
||||
case Mac::Address::kTypeExtended:
|
||||
VerifyOrExit(*reinterpret_cast<const uint64_t *>(aRadioContext->mCslExtAddress.m8) != 0);
|
||||
VerifyOrExit(src.GetExtended() == *static_cast<const Mac::ExtAddress *>(&aRadioContext->mCslExtAddress));
|
||||
matches = true;
|
||||
break;
|
||||
|
||||
@@ -43,6 +43,10 @@ using namespace ot;
|
||||
#if OPENTHREAD_CONFIG_OTNS_ENABLE
|
||||
|
||||
OT_TOOL_WEAK
|
||||
void otPlatOtnsStatus(const char *aStatus) { LogAlways("[OTNS] %s", aStatus); }
|
||||
void otPlatOtnsStatus(const char *aStatus)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aStatus);
|
||||
LogAlways("[OTNS] %s", aStatus);
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_CONFIG_OTNS_ENABLE
|
||||
|
||||
Reference in New Issue
Block a user