From a30ecc39cddf971de0b5b5aca17d30bbfe56204d Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 7 Jul 2025 10:19:04 -0500 Subject: [PATCH] arm/lpc32xx/include/bsp/lpc32xx.h: Add unused element in structure This header file defines multiple empty structures which are reported as errors by the test spstdc17 using GCC 15. Added an element named "unused" to each structure. The macro LPC32XX_FILL() was checked to ensure it handles the modified structure correctly. Closes #5295. --- bsps/arm/lpc32xx/include/bsp/lpc32xx.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/bsps/arm/lpc32xx/include/bsp/lpc32xx.h b/bsps/arm/lpc32xx/include/bsp/lpc32xx.h index cd56c96080..3df1ea72dd 100644 --- a/bsps/arm/lpc32xx/include/bsp/lpc32xx.h +++ b/bsps/arm/lpc32xx/include/bsp/lpc32xx.h @@ -238,39 +238,51 @@ #define LPC32XX_RESERVE(a, b) uint8_t reserved_ ## b [b - a] typedef struct { + uint32_t unused; } lpc32xx_nand_slc; typedef struct { + uint32_t unused; } lpc32xx_ssp; typedef struct { + uint32_t unused; } lpc32xx_spi; typedef struct { + uint32_t unused; } lpc32xx_sd_card; typedef struct { + uint32_t unused; } lpc32xx_usb; typedef struct { + uint32_t unused; } lpc32xx_lcd; typedef struct { + uint32_t unused; } lpc32xx_etb; typedef struct { + uint32_t unused; } lpc32xx_syscon; typedef struct { + uint32_t unused; } lpc32xx_uart_ctrl; typedef struct { + uint32_t unused; } lpc32xx_uart; typedef struct { + uint32_t unused; } lpc32xx_ms_timer; typedef struct { + uint32_t unused; } lpc32xx_hs_timer; /** @@ -345,18 +357,23 @@ typedef struct { } lpc32xx_wdt; typedef struct { + uint32_t unused; } lpc32xx_debug; typedef struct { + uint32_t unused; } lpc32xx_adc; typedef struct { + uint32_t unused; } lpc32xx_keyscan; typedef struct { + uint32_t unused; } lpc32xx_pwm; typedef struct { + uint32_t unused; } lpc32xx_mcpwm; typedef struct {