bsps/irq: Fix array bounds warning

Use a one element array to prevent array subscript index is outside
array bounds warnings.

Close #5298.
This commit is contained in:
Sebastian Huber
2025-08-13 01:52:10 +02:00
parent 45b1495a8a
commit 00bef3226d

View File

@@ -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)