mirror of
https://github.com/espressif/openthread.git
synced 2026-08-10 20:57:47 +00:00
[posix] fix unused variable when log level is less than OT_LOG_LEVEL_CRIT (#6642)
This commit is contained in:
@@ -78,7 +78,12 @@ otError otPlatSetMcuPowerState(otInstance *aInstance, otPlatMcuPowerState aState
|
||||
|
||||
void otPlatAssertFail(const char *aFilename, int aLineNumber)
|
||||
{
|
||||
#if OPENTHREAD_CONFIG_LOG_PLATFORM && OPENTHREAD_CONFIG_LOG_LEVEL < OT_LOG_LEVEL_CRIT
|
||||
OT_UNUSED_VARIABLE(aFilename);
|
||||
OT_UNUSED_VARIABLE(aLineNumber);
|
||||
#else
|
||||
otLogCritPlat("assert failed at %s:%d", aFilename, aLineNumber);
|
||||
#endif
|
||||
// For debug build, use assert to genreate a core dump
|
||||
assert(false);
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user