mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-09 08:37:58 +08:00
score: Use flexible-array member for C99 and later
This addresses compiler warnings like this: warning: array subscript 0 is outside the bounds of an interior zero-length array 'abc[0]' [-Wzero-length-bounds]
This commit is contained in:
1 parent
87fdb206fa
commit
2ae557eb04
1 file changed
+5
-1
@@ -430,7 +430,11 @@
|
||||
* doesn't allow flexible array members. Use the GNU extension which is also
|
||||
* supported by other compilers.
|
||||
*/
|
||||
#define RTEMS_ZERO_LENGTH_ARRAY 0
|
||||
#if __STDC_VERSION__ >= 199409L
|
||||
#define RTEMS_ZERO_LENGTH_ARRAY
|
||||
#else
|
||||
#define RTEMS_ZERO_LENGTH_ARRAY 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Returns a pointer to the container of a specified member pointer.
|
||||
|
||||
Reference in new issue
Block a user