forked from Imagelibrary/rtems
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user