arm/stm32u5: Address unused parameter warnings

Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
This commit is contained in:
Joel Sherrill
2025-10-10 13:05:58 -05:00
committed by Gedare Bloom
parent 94475b3386
commit dcde65029b
6 changed files with 43 additions and 0 deletions

View File

@@ -168,6 +168,8 @@ static bool stm32u5_uart_first_open(
rtems_libio_open_close_args_t *args
)
{
(void) args;
stm32u5_uart_context *ctx;
UART_HandleTypeDef *uart;
#ifdef BSP_CONSOLE_USE_INTERRUPTS
@@ -210,6 +212,8 @@ static void stm32u5_uart_last_close(
rtems_libio_open_close_args_t *args
)
{
(void) args;
#ifdef BSP_CONSOLE_USE_INTERRUPTS
stm32u5_uart_context *ctx;
@@ -220,6 +224,9 @@ static void stm32u5_uart_last_close(
stm32u5_uart_interrupt,
tty
);
#else
(void) tty;
(void) base;
#endif
}
@@ -272,6 +279,10 @@ rtems_status_code console_initialize(
void *arg
)
{
(void) major;
(void) minor;
(void) arg;
size_t i;
rtems_termios_initialize();

View File

@@ -66,6 +66,8 @@ static void stm32u5_rtc_get_time( rtems_time_of_day *tod )
static void stm32u5_rtc_device_initialize( int minor )
{
(void) minor;
hrtc.Instance = RTC;
hrtc.Init.HourFormat = RTC_HOURFORMAT_24;
hrtc.Init.AsynchPrediv = 127;
@@ -83,6 +85,8 @@ static void stm32u5_rtc_device_initialize( int minor )
static int stm32u5_rtc_device_get_time( int minor, rtems_time_of_day *tod )
{
(void) minor;
stm32u5_rtc_get_time( tod );
return 0;
@@ -93,6 +97,8 @@ static int stm32u5_rtc_device_set_time(
const rtems_time_of_day *tod
)
{
(void) minor;
sTime.Hours = (uint8_t) tod->hour;
sTime.Minutes = (uint8_t) tod->minute;
sTime.Seconds = (uint8_t) tod->second;
@@ -113,6 +119,8 @@ static int stm32u5_rtc_device_set_time(
static bool stm32u5_rtc_device_probe( int minor )
{
(void) minor;
return true;
}
@@ -131,6 +139,8 @@ rtc_tbl RTC_Table[] = {
void BSP_START_TEXT_SECTION HAL_RTC_MspInit( RTC_HandleTypeDef *hrtc )
{
(void) hrtc;
/* Enable peripheral clocks and battery backup. */
__HAL_RCC_PWR_CLK_ENABLE();
HAL_PWR_EnableBkUpAccess();

View File

@@ -74,6 +74,8 @@ static const stm32u5_gpio_config gpiod_af12 = {
void HAL_SD_MspInit( SD_HandleTypeDef *hsd )
{
(void) hsd;
/* Set PD7 to LOW to enable power to SD Card. */
GPIO_InitTypeDef GPIO_InitStruct = { 0 };
__HAL_RCC_GPIOD_CLK_ENABLE();

View File

@@ -933,6 +933,10 @@ HAL_StatusTypeDef HAL_PWR_GetConfigAttributes(uint32_t Item, uint32_t *pAttribut
attributes = ((PWR->PRIVCFGR & PWR_PRIVCFGR_NSPRIV) == 0U) ? PWR_NSEC_NPRIV : PWR_NSEC_PRIV;
}
#else
#ifdef __rtems__
(void) Item;
#endif
/* Get Non-Secure privileges attribute */
attributes = ((PWR->PRIVCFGR & PWR_PRIVCFGR_NSPRIV) == 0U) ? PWR_NSEC_NPRIV : PWR_NSEC_PRIV;
#endif /* __ARM_FEATURE_CMSE */

View File

@@ -1666,6 +1666,10 @@ HAL_StatusTypeDef HAL_RCC_ClockConfig(const RCC_ClkInitTypeDef *const pRCC_Clk
*/
void HAL_RCC_MCOConfig(uint32_t RCC_MCOx, uint32_t RCC_MCOSource, uint32_t RCC_MCODiv)
{
#ifdef __rtems__
(void) RCC_MCOx;
#endif
GPIO_InitTypeDef gpio_initstruct;
/* Check the parameters */
assert_param(IS_RCC_MCO(RCC_MCOx));
@@ -2108,6 +2112,10 @@ void HAL_RCC_ConfigAttributes(uint32_t Item, uint32_t Attributes)
CLEAR_BIT(RCC->PRIVCFGR, RCC_PRIVCFGR_NSPRIV);
break;
#else
#ifdef __rtems__
(void) Item;
#endif
/* Non-secure Privilege attribute */
case RCC_NSEC_PRIV:
SET_BIT(RCC->PRIVCFGR, RCC_PRIVCFGR_NSPRIV);
@@ -2162,6 +2170,10 @@ HAL_StatusTypeDef HAL_RCC_GetConfigAttributes(uint32_t Item, uint32_t *pAttribut
attributes = ((RCC->PRIVCFGR & RCC_PRIVCFGR_NSPRIV) == 0U) ? RCC_NSEC_NPRIV : RCC_NSEC_PRIV;
}
#else
#ifdef __rtems__
(void) Item;
#endif
/* Get Non-Secure privileges attribute */
attributes = ((RCC->PRIVCFGR & RCC_PRIVCFGR_NSPRIV) == 0U) ? RCC_NSEC_NPRIV : RCC_NSEC_PRIV;
#endif /* __ARM_FEATURE_CMSE */

View File

@@ -146,6 +146,10 @@
*/
ErrorStatus LL_DAC_DeInit(const DAC_TypeDef *DACx)
{
#ifdef __rtems__
(void) DACx;
#endif
/* Check the parameters */
assert_param(IS_DAC_ALL_INSTANCE(DACx));