mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
[build] address new warnings with clang-14 (#8924)
This commit adds two small changes to address new warnings when building with clang-14. It also updates `mbedtls` CMakeLists to set `MBEDTLS_FATAL_WARNINGS` option as `OFF` (so that compiler warnings are not treated as errors). This avoid issues with new warning for `unused-but-set-variable` emitted by clang-14.
This commit is contained in:
committed by
GitHub
parent
b48544c3b8
commit
356b4a6a58
@@ -60,7 +60,7 @@ static uint16_t sRawPowerSettingLength = 0;
|
||||
|
||||
void otPlatDiagModeSet(bool aMode) { sDiagMode = aMode; }
|
||||
|
||||
bool otPlatDiagModeGet() { return sDiagMode; }
|
||||
bool otPlatDiagModeGet(void) { return sDiagMode; }
|
||||
|
||||
void otPlatDiagChannelSet(uint8_t aChannel) { OT_UNUSED_VARIABLE(aChannel); }
|
||||
|
||||
|
||||
+1
-1
@@ -3574,7 +3574,7 @@ template <> otError Interpreter::Process<Cmd("eidcache")>(Arg aArgs[])
|
||||
|
||||
memset(&iterator, 0, sizeof(iterator));
|
||||
|
||||
for (uint8_t i = 0;; i++)
|
||||
while (true)
|
||||
{
|
||||
SuccessOrExit(otThreadGetNextCacheEntry(GetInstancePtr(), &entry, &iterator));
|
||||
OutputEidCacheEntry(entry);
|
||||
|
||||
Vendored
+2
@@ -45,6 +45,8 @@ find_program(SED_EXE sed)
|
||||
string(REPLACE "-Wconversion" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
string(REPLACE "-Wconversion" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
|
||||
set(MBEDTLS_FATAL_WARNINGS OFF CACHE BOOL "Compiler warnings treated as errors" FORCE)
|
||||
|
||||
add_subdirectory(repo)
|
||||
|
||||
if(UNIFDEFALL_EXE AND SED_EXE AND UNIFDEF_VERSION VERSION_GREATER_EQUAL 2.10)
|
||||
|
||||
Reference in New Issue
Block a user