mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04: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:
parent
fc00236d79
commit
1b76253e0e
@ -90,7 +90,6 @@
|
||||
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
--------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <xtensa/config/core.h>
|
||||
|
@ -19,10 +19,12 @@
|
||||
#pragma once
|
||||
#include <sdkconfig.h>
|
||||
#include <stdlib.h>
|
||||
#include "esp_compiler.h"
|
||||
|
||||
#include_next <assert.h>
|
||||
|
||||
|
||||
#if defined(CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT) && !defined(NDEBUG)
|
||||
#undef assert
|
||||
#define assert(__e) ((__e) ? (void)0 : abort())
|
||||
#define assert(__e) (likely(__e)) ? (void)0 : abort()
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user