From 69ab3140f892b64c6daf4ac0397113f9e16b00b3 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 25 Nov 2025 12:54:55 -0600 Subject: [PATCH] bsps/riscv/.../altera_epcq_driver.c: Address type-limits warnings This change was made to address GCC -Wtype-limits warnings. In this case, the counter variable was uint16_t but the value of ALTERA_EPCQ_CONTROLLER2_1US_TIMEOUT_VALUE was too large for uint16_t. --- bsps/riscv/niosv/flash/altera_epcq_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsps/riscv/niosv/flash/altera_epcq_driver.c b/bsps/riscv/niosv/flash/altera_epcq_driver.c index 0ebde57f03..ba019d95fb 100644 --- a/bsps/riscv/niosv/flash/altera_epcq_driver.c +++ b/bsps/riscv/niosv/flash/altera_epcq_driver.c @@ -872,7 +872,7 @@ static int alt_epcq_poll_for_write_in_progress ( /* we'll want to implement timeout if a timeout value is specified */ #if ALTERA_EPCQ_CONTROLLER2_1US_TIMEOUT_VALUE > 0 uint32_t timeout = ALTERA_EPCQ_CONTROLLER2_1US_TIMEOUT_VALUE; - uint16_t counter = 0; + uint32_t counter = 0; #endif /* return -EINVAL if epcq_flash_info is NULL */