diff --git a/bsps/include/bsp/irq-generic.h b/bsps/include/bsp/irq-generic.h index eeea2e3df2..279a0d3575 100644 --- a/bsps/include/bsp/irq-generic.h +++ b/bsps/include/bsp/irq-generic.h @@ -68,7 +68,12 @@ extern "C" { #endif #ifndef BSP_INTERRUPT_DISPATCH_TABLE_SIZE - #define BSP_INTERRUPT_DISPATCH_TABLE_SIZE BSP_INTERRUPT_VECTOR_COUNT + #if BSP_INTERRUPT_VECTOR_COUNT == 0 + /* Avoid array subscript index is outside array bounds warnings */ + #define BSP_INTERRUPT_DISPATCH_TABLE_SIZE 1 + #else + #define BSP_INTERRUPT_DISPATCH_TABLE_SIZE BSP_INTERRUPT_VECTOR_COUNT + #endif #endif #if !defined(BSP_IRQ_HAVE_GET_SET_AFFINITY) && defined(RTEMS_SMP)