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:
Carles Cufi <carles.cufi@nordicsemi.no>
Loading
Please sign in to comment