Skip to content
Commit 267469b5 authored by Carles Cufi's avatar Carles Cufi Committed by Benjamin Cabé
Browse files

flash: spi_nor: Fix VLA error when building with clang



The following error is issued by clang when building with
SPI_NOR_SFDP_RUNTIME enabled:

error: fields must have a constant size:
'variable length array in structure' extension will never be supported
1379 | uint32_t dw[MIN(php->len_dw, 20)];

Instead, hardcode the array length to 20 32-bit words (it's instantiated
in the stack anyway).

Signed-off-by: default avatarCarles Cufi <carles.cufi@nordicsemi.no>
parent 5f5e3113
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment