Fix pedanic warnings without a storage increase

Use RTEMS_ZERO_LENGTH_ARRAY for flexible array member.

Update #4662.
This commit is contained in:
Sebastian Huber
2022-08-30 07:58:56 +02:00
parent 1be6dc18d3
commit dad6d32271
2 changed files with 11 additions and 1 deletions

View File

@@ -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[] = {

View File

@@ -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;
/**