[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:
Yakun Xu
2026-01-06 14:53:38 -08:00
committed by GitHub
parent bcc41e9b44
commit 31631142c2
25 changed files with 104 additions and 58 deletions
+2 -1
View File
@@ -34,6 +34,7 @@
#include <openthread-system.h>
#include <openthread/cli.h>
#include <openthread/logging.h>
#include <openthread/platform/debug_uart.h>
#include "cli/cli_config.h"
#include "common/code_utils.hpp"
@@ -221,7 +222,7 @@ static void Send(void)
{
#if OPENTHREAD_CONFIG_ENABLE_DEBUG_UART
/* duplicate the output to the debug uart */
otSysDebugUart_write_bytes(reinterpret_cast<uint8_t *>(sTxBuffer + sTxHead), sSendLength);
otPlatDebugUart_write_bytes(reinterpret_cast<uint8_t *>(sTxBuffer + sTxHead), sSendLength);
#endif
IgnoreError(otPlatUartSend(reinterpret_cast<uint8_t *>(sTxBuffer + sTxHead), sSendLength));
}