esp_err: Don't compile in error message strings in "silent assertions" mode
Reported on forum https://esp32.com/viewtopic.php?f=13&t=7396&p=31419#p31419
This commit is contained in:
parent
4faa2a8e52
commit
127693126a
1 changed files with 7 additions and 0 deletions
|
@ -102,6 +102,13 @@ void _esp_error_check_failed(esp_err_t rc, const char *file, int line, const cha
|
||||||
esp_err_t __err_rc = (x); \
|
esp_err_t __err_rc = (x); \
|
||||||
(void) sizeof(__err_rc); \
|
(void) sizeof(__err_rc); \
|
||||||
} while(0);
|
} while(0);
|
||||||
|
#elif defined(CONFIG_OPTIMIZATION_ASSERTIONS_SILENT)
|
||||||
|
#define ESP_ERROR_CHECK(x) do { \
|
||||||
|
esp_err_t __err_rc = (x); \
|
||||||
|
if (__err_rc != ESP_OK) { \
|
||||||
|
abort(); \
|
||||||
|
} \
|
||||||
|
} while(0);
|
||||||
#else
|
#else
|
||||||
#define ESP_ERROR_CHECK(x) do { \
|
#define ESP_ERROR_CHECK(x) do { \
|
||||||
esp_err_t __err_rc = (x); \
|
esp_err_t __err_rc = (x); \
|
||||||
|
|
Loading…
Reference in a new issue