Joel Sherrill created an issue: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5298

Assignee: Sebastian Huber

## Summary

This warning occurs in multiple BSPs:

```
../../../bsps/shared/irq/irq-record.c: In function 
'bsp_interrupt_get_dispatch_table_slot':
../../../bsps/shared/irq/irq-record.c:56:10: warning: array subscript index is 
outside array bounds of 'rtems_interrupt_entry *[0]' [-Warray-bounds=]
   56 |   return &_Record_Interrupt_dispatch_table[ index ];
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../bsps/shared/irq/irq-record.c:43:1: note: while referencing 
'_Record_Interrupt_dispatch_table'
   43 | _Record_Interrupt_dispatch_table[ BSP_INTERRUPT_DISPATCH_TABLE_SIZE ];
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../../../bsps/shared/irq/irq-generic.c: In function 
'bsp_interrupt_get_dispatch_table_slot':
../../../bsps/shared/irq/irq-generic.c:53:10: warning: array subscript index is 
outside array bounds of 'rtems_interrupt_entry *[0]' [-Warray-bounds=]
   53 |   return &bsp_interrupt_dispatch_table[ index ];
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../bsps/shared/irq/irq-generic.c:47:1: note: while referencing 
'bsp_interrupt_dispatch_table'
   47 | bsp_interrupt_dispatch_table[ BSP_INTERRUPT_DISPATCH_TABLE_SIZE ];
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

```

I see this warning in the following BSPS:

- m68k/av5282
- m68k/mcf5235
- m68k/mcf5329
- m68k/uC5282
- moxie/moxiesim
- powerpc/beatnik
- powerpc/mvme3100
- powerpc/mvme5500
- powerpc/ss555
- powerpc/virtex4
- powerpc/virtex5




## Steps to reproduce
Build and look for warnings

### Pre-set options

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5298
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
bugs@rtems.org
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to