From 75312c1b9b18c37fdf0b774a5c1bb89ccf22a5bc Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 4 Jul 2025 10:20:17 -0500 Subject: [PATCH] bsps/include/grlib/ambapp.h: Fix warning for zero length array use The use of an array of zero length at the end of a structure needs to be careful to use RTEMS_ZERO_LENGTH_ARRAY since the accepted syntax varies across C language versions. --- bsps/include/grlib/ambapp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bsps/include/grlib/ambapp.h b/bsps/include/grlib/ambapp.h index 1afd802860..e359a1d8ef 100644 --- a/bsps/include/grlib/ambapp.h +++ b/bsps/include/grlib/ambapp.h @@ -36,6 +36,8 @@ #include +#include + /* Include VENDOR and DEVICE definitions */ #include "ambapp_ids.h" @@ -102,7 +104,7 @@ struct ambapp_dev { unsigned short device; /* Device ID */ /* Device info (APB/AHB dep. on type) */ - struct ambapp_common_info devinfo[0]; + struct ambapp_common_info devinfo[RTEMS_ZERO_LENGTH_ARRAY]; }; /* Describes a complete AMBA Core. Each device may consist of 3 interfaces */