Browse Source

drivers display_nrf_led_matrix: Init variable to avoid compile warning

Initialize row_index to avoid a compile warning.
The warning seems incorrect, as row_index is initialized in the first
interation of the loop, but the overhead of initializing it is trivial,
so we may as well just do it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
pull/85819/head
Alberto Escolar Piedras 5 months ago committed by Benjamin Cabé
parent
commit
22cd514048
  1. 2
      drivers/display/display_nrf_led_matrix.c

2
drivers/display/display_nrf_led_matrix.c

@ -339,7 +339,7 @@ static void timer_irq_handler(void *arg)
const struct display_drv_config *dev_config = dev->config; const struct display_drv_config *dev_config = dev->config;
uint8_t iteration = dev_data->iteration; uint8_t iteration = dev_data->iteration;
uint8_t pixel_idx; uint8_t pixel_idx;
uint8_t row_idx; uint8_t row_idx = 0;
/* The timer is automagically stopped and cleared by shortcuts /* The timer is automagically stopped and cleared by shortcuts
* on the same event (COMPARE0) that generates this interrupt. * on the same event (COMPARE0) that generates this interrupt.

Loading…
Cancel
Save