From 71b2bc55bd1301aff7fe910d598215f3fe8e087f Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 24 Nov 2025 17:43:33 -0600 Subject: [PATCH] bsps/riscv/niosv/.../altera_epcq_driver.c: Address type-limits warnings These changes were made to address GCC -Wtype-limits warnings. In this case, the values being checked were all unsigned and the checks redundant. --- bsps/riscv/niosv/flash/altera_epcq_driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bsps/riscv/niosv/flash/altera_epcq_driver.c b/bsps/riscv/niosv/flash/altera_epcq_driver.c index 80ece7d5e6..0ebde57f03 100644 --- a/bsps/riscv/niosv/flash/altera_epcq_driver.c +++ b/bsps/riscv/niosv/flash/altera_epcq_driver.c @@ -834,9 +834,7 @@ static inline int alt_epcq_validate_read_write_arguments ( /* make sure start and end address is less then the end address of the flash */ if ( start_address >= epcq_flash_info->data_end || - end_address > epcq_flash_info->data_end || - offset < 0 || - length < 0 + end_address > epcq_flash_info->data_end ) { return -EINVAL; }