C/Cxx: unify static assertions with the macro ESP_STATIC_ASSERT
Closes https://github.com/espressif/esp-idf/issues/9938
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <sdkconfig.h>
|
||||
#include <esp_log.h>
|
||||
#include <assert.h>
|
||||
#include "esp_assert.h"
|
||||
|
||||
// compile time switches
|
||||
#define SPIFFS_TAG "SPIFFS"
|
||||
@@ -166,7 +167,7 @@ extern void spiffs_api_unlock(struct spiffs_t *fs);
|
||||
// spiffs_object_ix_header fields + at least some LUT entries)
|
||||
#define SPIFFS_OBJ_META_LEN (CONFIG_SPIFFS_META_LENGTH)
|
||||
#define SPIFFS_PAGE_EXTRA_SIZE (64)
|
||||
_Static_assert(SPIFFS_OBJ_META_LEN + SPIFFS_OBJ_NAME_LEN + SPIFFS_PAGE_EXTRA_SIZE
|
||||
ESP_STATIC_ASSERT(SPIFFS_OBJ_META_LEN + SPIFFS_OBJ_NAME_LEN + SPIFFS_PAGE_EXTRA_SIZE
|
||||
<= CONFIG_SPIFFS_PAGE_SIZE, "SPIFFS_OBJ_META_LEN or SPIFFS_OBJ_NAME_LEN too long");
|
||||
|
||||
// Size of buffer allocated on stack used when copying data.
|
||||
|
||||
Reference in New Issue
Block a user