mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 19:54:32 +02:00
newlib/assert: placed unlikely macro as part of assertion
newlib/assert: replace unlikely with likely to keep original assertion newlib/assert: fix assert macro that uses likely freertos/port: add the missing sdkconfig.h back newlib/assert: assert macro back to a single line
This commit is contained in:
@@ -90,7 +90,6 @@
|
|||||||
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <xtensa/config/core.h>
|
#include <xtensa/config/core.h>
|
||||||
|
@@ -19,10 +19,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <sdkconfig.h>
|
#include <sdkconfig.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include "esp_compiler.h"
|
||||||
|
|
||||||
#include_next <assert.h>
|
#include_next <assert.h>
|
||||||
|
|
||||||
|
|
||||||
#if defined(CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT) && !defined(NDEBUG)
|
#if defined(CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT) && !defined(NDEBUG)
|
||||||
#undef assert
|
#undef assert
|
||||||
#define assert(__e) ((__e) ? (void)0 : abort())
|
#define assert(__e) (likely(__e)) ? (void)0 : abort()
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user