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 <[email protected]>
---
 CryptoPkg/Include/Library/BaseCryptLib.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CryptoPkg/Include/Library/BaseCryptLib.h 
b/CryptoPkg/Include/Library/BaseCryptLib.h
index a52bd91ad6..6bf500c888 100644
--- a/CryptoPkg/Include/Library/BaseCryptLib.h
+++ b/CryptoPkg/Include/Library/BaseCryptLib.h
@@ -2167,7 +2167,7 @@ Pkcs1v2Encrypt (
 
 typedef struct {
   UINT32    CertDataLength;       // The length in bytes of X.509 certificate.
-  UINT8     CertDataBuffer[0];    // The X.509 certificate content (DER).
+  UINT8     CertDataBuffer[];    // The X.509 certificate content (DER).
 } EFI_CERT_DATA;
 
 typedef struct {
-- 
2.40.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108007): https://edk2.groups.io/g/devel/message/108007
Mute This Topic: https://groups.io/mt/100935953/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to