mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
bsps/irq: Fix type limits warnings
Set BSP_INTERRUPT_VECTOR_COUNT to 1 to avoid type limits and array bounds warnings. Make sure all functions using the default interrupt controller implementation return a status of RTEMS_UNSATISFIED. Update #5298. Close #5377.
This commit is contained in:
@@ -50,7 +50,7 @@ extern "C" {
|
||||
* By default, no interrupt vectors are supported and all related directives
|
||||
* return RTEMS_INVALID_ID.
|
||||
*/
|
||||
#define BSP_INTERRUPT_VECTOR_COUNT 0
|
||||
#define BSP_INTERRUPT_VECTOR_COUNT 1
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
@@ -68,12 +68,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef BSP_INTERRUPT_DISPATCH_TABLE_SIZE
|
||||
#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
|
||||
#define BSP_INTERRUPT_DISPATCH_TABLE_SIZE BSP_INTERRUPT_VECTOR_COUNT
|
||||
#endif
|
||||
|
||||
#if !defined(BSP_IRQ_HAVE_GET_SET_AFFINITY) && defined(RTEMS_SMP)
|
||||
|
||||
@@ -45,7 +45,7 @@ rtems_status_code bsp_interrupt_get_attributes(
|
||||
(void) vector;
|
||||
(void) attributes;
|
||||
|
||||
return RTEMS_SUCCESSFUL;
|
||||
return RTEMS_UNSATISFIED;
|
||||
}
|
||||
|
||||
rtems_status_code bsp_interrupt_is_pending(
|
||||
|
||||
Reference in New Issue
Block a user