mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 20:21:04 +00:00
esp32: Remove trialing semicolon from function-like macros
This commit removes trailing semicolons following a while(0) from function-like macros in IDF. This will force those macros to be called with a semicolon when called.
This commit is contained in:
@@ -104,14 +104,14 @@ void _esp_error_check_failed_without_abort(esp_err_t rc, const char *file, int l
|
||||
#define ESP_ERROR_CHECK(x) do { \
|
||||
esp_err_t __err_rc = (x); \
|
||||
(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);
|
||||
} while(0)
|
||||
#else
|
||||
#define ESP_ERROR_CHECK(x) do { \
|
||||
esp_err_t __err_rc = (x); \
|
||||
@@ -119,7 +119,7 @@ void _esp_error_check_failed_without_abort(esp_err_t rc, const char *file, int l
|
||||
_esp_error_check_failed(__err_rc, __FILE__, __LINE__, \
|
||||
__ASSERT_FUNC, #x); \
|
||||
} \
|
||||
} while(0);
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user