From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 9616DD8046F for ; Thu, 24 Aug 2023 16:35:38 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=qmMKc8B9Nncfu6HvBdZHtpFXEE4Jz24smlaCP6LgE/A=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1692894937; v=1; b=fsIB8gvaF2G1rgkUN7iw3m1XGwotGxlxOdYZR9CCSJ/x2NUhu67axzXQymIUVKu3lqdpNBTl 4FBfjuf0L9QQvXLxcYxLgf30+7t4n3dp1IaVsDMRtwXPRUGe/l+4YMny7ObnR3CGEQUriITBqJF zATUCDuvtQPRWpSMEDZALUSA= X-Received: by 127.0.0.2 with SMTP id h7u5YY7687511xnadiy1FCN7; Thu, 24 Aug 2023 09:35:37 -0700 X-Received: from smtp26.services.sfr.fr (smtp26.services.sfr.fr [93.17.128.217]) by mx.groups.io with SMTP id smtpd.web11.829.1692892487907609175 for ; Thu, 24 Aug 2023 08:54:49 -0700 X-mail-filterd: {"version":"1.7.1","queueID":"4RWnhj3S6Jz1LQKdL","contextId": "2a13fb49-7d69-4bbd-9c30-bd702b8dbbad"} X-Received: from localhost.localdomain (179.211.201.77.rev.sfr.net [77.201.211.179]) by msfrf2641.sfr.fr (SMTP Server) with ESMTP id 4RWnhj3S6Jz1LQKdL; Thu, 24 Aug 2023 17:54:45 +0200 (CEST) X-mail-filterd: {"version":"1.7.1","queueID":"4RWnhj2CLsz1LQKcd","contextId": "49bc0f56-685d-406b-912a-51f27d8c5d29"} X-sfr-mailing: LEGIT X-sfr-spamrating: 40 X-sfr-spam: not-spam X-Received: from localhost.localdomain (179.211.201.77.rev.sfr.net [77.201.211.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: ehaouas@noos.fr) by msfrf2641.sfr.fr (SMTP Server) with ESMTPSA id 4RWnhj2CLsz1LQKcd; Thu, 24 Aug 2023 17:54:45 +0200 (CEST) From: Elyes Haouas To: devel@edk2.groups.io Cc: Elyes Haouas Subject: [edk2-devel] [PATCH 1/3] MdeModulePkg/Include/UniversalPayload: Use C99 flexible arrays Date: Thu, 24 Aug 2023 17:54:35 +0200 Message-Id: <20230824155437.3218-1-ehaouas@noos.fr> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ehaouas@noos.fr List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ExPTmgXSIY5Mke2VlcFzm400x7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=fsIB8gva; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none 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 --- MdeModulePkg/Include/UniversalPayload/ExtraData.h | 2 +- MdeModulePkg/Include/UniversalPayload/PciRootBridges.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Include/UniversalPayload/ExtraData.h b/MdeModuleP= kg/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 {=0D UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;=0D UINT32 Count;=0D - UNIVERSAL_PAYLOAD_EXTRA_DATA_ENTRY Entry[0];=0D + UNIVERSAL_PAYLOAD_EXTRA_DATA_ENTRY Entry[];=0D } UNIVERSAL_PAYLOAD_EXTRA_DATA;=0D =0D #pragma pack()=0D diff --git a/MdeModulePkg/Include/UniversalPayload/PciRootBridges.h b/MdeMo= dulePkg/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;=0D BOOLEAN ResourceAssigned;=0D UINT8 Count;=0D - UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE RootBridge[0];=0D + UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE RootBridge[];=0D } UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES;=0D =0D #pragma pack()=0D --=20 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] -=-=-=-=-=-=-=-=-=-=-=-