From 19cc585d2ef8f0d670fdeed218f529c58cfdf606 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 25 Nov 2025 08:51:39 -0600 Subject: [PATCH] bsps/powerpc/gen5200/irq/irq.c: Address type-limits warnings These changes were made to address GCC -Wtype-limits warnings. In this case, the irq was unsigned and there was no need to check it being <= 0. --- bsps/powerpc/gen5200/irq/irq.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bsps/powerpc/gen5200/irq/irq.c b/bsps/powerpc/gen5200/irq/irq.c index 8bc85fb353..d70f683582 100644 --- a/bsps/powerpc/gen5200/irq/irq.c +++ b/bsps/powerpc/gen5200/irq/irq.c @@ -105,9 +105,13 @@ static inline bool is_processor_irq( rtems_vector_number irqLine) */ static inline bool is_siu_irq( rtems_vector_number irqLine) { - - return ((irqLine <= BSP_SIU_IRQ_MAX_OFFSET) - && (irqLine >= BSP_SIU_IRQ_LOWEST_OFFSET)); + /* + * The GCC warning -Wtype-limits flagged that the + * ((irqLine <= BSP_SIU_IRQ_MAX_OFFSET) part of the expression was + * not needed because irqLine is unsigned and BSP_SIU_IRQ_MAX_OFFSET + * is 0. + */ + return (irqLine <= BSP_SIU_IRQ_MAX_OFFSET); } /*