From: Elyes Haouas <ehaouas@noos.fr>
To: devel@edk2.groups.io
Cc: Elyes Haouas <ehaouas@noos.fr>
Subject: [edk2-devel] [PATCH 1/3] MdeModulePkg/Include/UniversalPayload: Use C99 flexible arrays
Date: Thu, 24 Aug 2023 17:54:35 +0200 [thread overview]
Message-ID: <20230824155437.3218-1-ehaouas@noos.fr> (raw)
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>
---
| 2 +-
MdeModulePkg/Include/UniversalPayload/PciRootBridges.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--git a/MdeModulePkg/Include/UniversalPayload/ExtraData.h b/MdeModulePkg/Include/UniversalPayload/ExtraData.h
index 334dfd2b9e..0583fff10a 100644
--- a/MdeModulePkg/Include/UniversalPayload/ExtraData.h
+++ b/MdeModulePkg/Include/UniversalPayload/ExtraData.h
@@ -21,7 +21,7 @@ typedef struct {
typedef struct {
UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
UINT32 Count;
- UNIVERSAL_PAYLOAD_EXTRA_DATA_ENTRY Entry[0];
+ UNIVERSAL_PAYLOAD_EXTRA_DATA_ENTRY Entry[];
} UNIVERSAL_PAYLOAD_EXTRA_DATA;
#pragma pack()
diff --git a/MdeModulePkg/Include/UniversalPayload/PciRootBridges.h b/MdeModulePkg/Include/UniversalPayload/PciRootBridges.h
index 37260da3b1..81f1aa3dfe 100644
--- a/MdeModulePkg/Include/UniversalPayload/PciRootBridges.h
+++ b/MdeModulePkg/Include/UniversalPayload/PciRootBridges.h
@@ -79,7 +79,7 @@ typedef struct {
UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
BOOLEAN ResourceAssigned;
UINT8 Count;
- UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE RootBridge[0];
+ UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE RootBridge[];
} UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES;
#pragma pack()
--
2.40.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108017): https://edk2.groups.io/g/devel/message/108017
Mute This Topic: https://groups.io/mt/100938776/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next reply other threads:[~2023-08-24 16:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-24 15:54 Elyes Haouas [this message]
2023-08-24 15:54 ` [edk2-devel] [PATCH 2/3] OvmfPkg/Library/CcExitLib: Use C99 flexible arrays Elyes Haouas
2023-08-24 15:54 ` [edk2-devel] [PATCH 3/3] UefiCpuPkg/Include/Guid: " Elyes Haouas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230824155437.3218-1-ehaouas@noos.fr \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox