public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH 1/4] EmbeddedPkg: Use C99 flexible arrays
@ 2023-08-24  5:42 Elyes Haouas
  2023-08-24  5:42 ` [edk2-devel] [PATCH 2/4] MdePkg/Include: " Elyes Haouas
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Elyes Haouas @ 2023-08-24  5:42 UTC (permalink / raw)
  To: devel; +Cc: Elyes Haouas

One-element or zero-length arrays have been deprecated since
last millennium.
Use C99 flexible arrays instead, it allows the compiler to
generate errors when the flexible array does not occur at the
end in the structure.

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
---
 EmbeddedPkg/Include/fdt.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/EmbeddedPkg/Include/fdt.h b/EmbeddedPkg/Include/fdt.h
index 120dbc8bc6..f64695da5c 100644
--- a/EmbeddedPkg/Include/fdt.h
+++ b/EmbeddedPkg/Include/fdt.h
@@ -81,14 +81,14 @@ struct fdt_reserve_entry {
 
 struct fdt_node_header {
   fdt32_t    tag;
-  char       name[0];
+  char       name[];
 };
 
 struct fdt_property {
   fdt32_t    tag;
   fdt32_t    len;
   fdt32_t    nameoff;
-  char       data[0];
+  char       data[];
 };
 
 #endif /* !__ASSEMBLY */
-- 
2.40.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108003): https://edk2.groups.io/g/devel/message/108003
Mute This Topic: https://groups.io/mt/100935948/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-24 14:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-24  5:42 [edk2-devel] [PATCH 1/4] EmbeddedPkg: Use C99 flexible arrays Elyes Haouas
2023-08-24  5:42 ` [edk2-devel] [PATCH 2/4] MdePkg/Include: " Elyes Haouas
2023-08-24  5:42 ` [edk2-devel] [PATCH 3/4] MdeModulePkg/Library/FrameBufferBltLib: " Elyes Haouas
2023-08-24  5:42 ` [edk2-devel] [PATCH 4/4] UefiPayloadPkg: " Elyes Haouas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox