<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 30, 2022 at 1:10 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Use RTEMS_ZERO_LENGTH_ARRAY for flexible array member.<br>
<br>
Update #4662.<br>
---<br>
 cpukit/include/rtems/confdefs/scheduler.h      | 10 ++++++++++<br>
 cpukit/include/rtems/score/schedulerpriority.h |  2 +-<br>
 2 files changed, 11 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/cpukit/include/rtems/confdefs/scheduler.h b/cpukit/include/rtems/confdefs/scheduler.h<br>
index 84ca810fd7..8ac943921f 100644<br>
--- a/cpukit/include/rtems/confdefs/scheduler.h<br>
+++ b/cpukit/include/rtems/confdefs/scheduler.h<br>
@@ -234,7 +234,17 @@ extern "C" {<br>
 #endif<br>
<br>
 #ifdef CONFIGURE_SCHEDULER<br>
+  /*<br>
+   * Ignore these warnings:<br>
+   *<br>
+   * - invalid use of structure with flexible array member<br>
+   *<br>
+   * - struct has no members<br>
+   */<br>
+  #pragma GCC diagnostic push<br>
+  #pragma GCC diagnostic ignored "-Wpedantic"<br></blockquote><div><br></div><div>This is heavy handed. -Warray-bounds should be enough.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
   CONFIGURE_SCHEDULER;<br>
+  #pragma GCC diagnostic pop<br>
 #endif<br>
<br>
 const Scheduler_Control _Scheduler_Table[] = {<br>
diff --git a/cpukit/include/rtems/score/schedulerpriority.h b/cpukit/include/rtems/score/schedulerpriority.h<br>
index e485e97c60..1325224fa9 100644<br>
--- a/cpukit/include/rtems/score/schedulerpriority.h<br>
+++ b/cpukit/include/rtems/score/schedulerpriority.h<br>
@@ -94,7 +94,7 @@ typedef struct {<br>
   /**<br>
    * @brief One ready queue per priority level.<br>
    */<br>
-  Chain_Control Ready[ 1 ];<br>
+  Chain_Control Ready[ RTEMS_ZERO_LENGTH_ARRAY ];<br>
 } Scheduler_priority_Context;<br>
<br>
 /**<br>
-- <br>
2.35.3<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div></div>