mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
Fix pedanic warnings without a storage increase
Use RTEMS_ZERO_LENGTH_ARRAY for flexible array member. Update #4662.
This commit is contained in:
@@ -234,7 +234,17 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIGURE_SCHEDULER
|
||||
/*
|
||||
* Ignore these warnings:
|
||||
*
|
||||
* - invalid use of structure with flexible array member
|
||||
*
|
||||
* - struct has no members
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||
CONFIGURE_SCHEDULER;
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
const Scheduler_Control _Scheduler_Table[] = {
|
||||
|
||||
@@ -94,7 +94,7 @@ typedef struct {
|
||||
/**
|
||||
* @brief One ready queue per priority level.
|
||||
*/
|
||||
Chain_Control Ready[ 1 ];
|
||||
Chain_Control Ready[ RTEMS_ZERO_LENGTH_ARRAY ];
|
||||
} Scheduler_priority_Context;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user