From d8c188757dac773c9d86b709dd99d129ae8dc935 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 10 Oct 2025 12:22:26 -0500 Subject: [PATCH] arm/lpc176x: Address unused parameter warnings Add "(void) param;" annotation to address unused parameter warnings. Found with GCC's warning -Wunused-parameter. --- bsps/arm/lpc176x/btimer/btimer.c | 1 + bsps/arm/lpc176x/can/can.c | 2 ++ bsps/arm/lpc176x/gpio/lpc-gpio.c | 2 ++ bsps/arm/lpc176x/pwm/pwmout.c | 2 ++ bsps/arm/lpc176x/start/bspidle.c | 2 ++ bsps/arm/lpc176x/start/dma-copy.c | 2 ++ 6 files changed, 11 insertions(+) diff --git a/bsps/arm/lpc176x/btimer/btimer.c b/bsps/arm/lpc176x/btimer/btimer.c index 33fa3f5b15..39a4dc1983 100644 --- a/bsps/arm/lpc176x/btimer/btimer.c +++ b/bsps/arm/lpc176x/btimer/btimer.c @@ -44,4 +44,5 @@ benchmark_timer_t benchmark_timer_read( void ) void benchmark_timer_disable_subtracting_average_overhead( bool find_avg_ovhead ) { + (void) find_avg_ovhead; } diff --git a/bsps/arm/lpc176x/can/can.c b/bsps/arm/lpc176x/can/can.c index f85ba3b437..b1d756ed86 100644 --- a/bsps/arm/lpc176x/can/can.c +++ b/bsps/arm/lpc176x/can/can.c @@ -407,6 +407,8 @@ static inline void search_and_call_int( const lpc176x_can_number number ) */ static void can_isr( void *arg ) { + (void) arg; + lpc176x_can_number i; for ( i = CAN_0; i < CAN_DEVICES_NUMBER; ++i ) { diff --git a/bsps/arm/lpc176x/gpio/lpc-gpio.c b/bsps/arm/lpc176x/gpio/lpc-gpio.c index e7ac285719..16152b3608 100644 --- a/bsps/arm/lpc176x/gpio/lpc-gpio.c +++ b/bsps/arm/lpc176x/gpio/lpc-gpio.c @@ -181,6 +181,8 @@ static void check_for_interrupt( */ static inline void lpc176x_gpio_isr( void *arg ) { + (void) arg; + unsigned int i; for ( i = 0; i < function_vector_size; ++i ) { diff --git a/bsps/arm/lpc176x/pwm/pwmout.c b/bsps/arm/lpc176x/pwm/pwmout.c index ff5bb4ee50..ae78ffda09 100644 --- a/bsps/arm/lpc176x/pwm/pwmout.c +++ b/bsps/arm/lpc176x/pwm/pwmout.c @@ -125,6 +125,8 @@ static void set_period( const lpc176x_microseconds period ) { + (void) pwm; + pwm_device->TCR = PWM_TCR_RESET; pwm_device->MR0 = period * PWM_PRESCALER_USECOND; pwm_device->LER |= PWM_LER_LATCH_MATCH_0; diff --git a/bsps/arm/lpc176x/start/bspidle.c b/bsps/arm/lpc176x/start/bspidle.c index c275cf914b..2942dc8fa0 100644 --- a/bsps/arm/lpc176x/start/bspidle.c +++ b/bsps/arm/lpc176x/start/bspidle.c @@ -38,6 +38,8 @@ void*bsp_idle_thread( const uintptr_t ignored ) { + (void) ignored; + while ( true ) { } } diff --git a/bsps/arm/lpc176x/start/dma-copy.c b/bsps/arm/lpc176x/start/dma-copy.c index abf03624a9..64be3f7409 100644 --- a/bsps/arm/lpc176x/start/dma-copy.c +++ b/bsps/arm/lpc176x/start/dma-copy.c @@ -42,6 +42,8 @@ static bool lpc176x_dma_status_table[ GPDMA_CH_NUMBER ]; static void lpc176x_dma_copy_handler( void *arg ) { + (void) arg; + /* Get interrupt status */ uint32_t tc = GPDMA_INT_TCSTAT; uint32_t err = GPDMA_INT_ERR_STAT;