mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/spi_flash_unused_variable_warning' into 'master'
spi_flash: fix unused variable warning with SPI_FLASH_DANGEROUS_WRITE_ALLOWED Closes IDFGH-6700 See merge request espressif/esp-idf!17020
This commit is contained in:
commit
35ad282b5d
@ -126,7 +126,8 @@ const DRAM_ATTR spi_flash_guard_funcs_t g_flash_guard_no_os_ops = {
|
||||
bootloader, partition table, or running application region.
|
||||
*/
|
||||
#if CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED
|
||||
#define CHECK_WRITE_ADDRESS(ADDR, SIZE)
|
||||
// Following helps in masking "unused variable" warning
|
||||
#define CHECK_WRITE_ADDRESS(ADDR, SIZE) ({(void) guard;})
|
||||
#else /* FAILS or ABORTS */
|
||||
#define CHECK_WRITE_ADDRESS(ADDR, SIZE) do { \
|
||||
if (guard && guard->is_safe_write_address && !guard->is_safe_write_address(ADDR, SIZE)) { \
|
||||
|
Loading…
x
Reference in New Issue
Block a user