Re: 回复: [edk2-devel] [PATCH 1/2] MdePkg: Update Base.h to be compliant with C11

Michael D Kinney michael.d.kinney at intel.com
Mon Mar 13 20:46:24 UTC 2023


Hi Rebecca,

You are a member of EDK II Maintainers, so you have permissions to set 'push' label.
It is preferred for the maintainer for a package to do this for the packages/content
they maintain.

If you have updated the patch series with Rbs and synced to latest edk2 repo, then
send an email with a link to the PRs.  That makes it simple for maintainers to perform
a final review and set 'push' label.

Thanks,

Mike

> -----Original Message-----
> From: Rebecca Cran <rebecca at bsdio.com>
> Sent: Monday, March 13, 2023 10:54 AM
> To: devel at edk2.groups.io; Gao, Liming <gaoliming at byosoft.com.cn>; Kinney, Michael D <michael.d.kinney at intel.com>;
> Liu, Zhiguang <zhiguang.liu at intel.com>
> Subject: Re: 回复: [edk2-devel] [PATCH 1/2] MdePkg: Update Base.h to be compliant with C11
> 
> I know I have access to the Github tianocore project and can push to the
> edk2-libc repo, but I've been assuming that I'm not allowed to push to
> the edk2 repo.
> 
> Is that correct, or can I go ahead and push this and any other patches
> that get reviewed?
> 
> 
> --
> Rebecca Cran
> 
> 
> On 3/9/23 7:45 PM, gaoliming via groups.io wrote:
> > Rebecca:
> >    This patch pass code review. It can be merged now. The second change to using __func__ is only for MdePkg. Do
> you expect the change in MdePkg is first merged?
> >
> > Thanks
> > Liming
> >> -----邮件原件-----
> >> 发件人: Rebecca Cran <rebecca at bsdio.com>
> >> 发送时间: 2023年3月7日 0:39
> >> 收件人: devel at edk2.groups.io; quic_rcran at quicinc.com; Michael D Kinney
> >> <michael.d.kinney at intel.com>; Liming Gao <gaoliming at byosoft.com.cn>;
> >> Zhiguang Liu <zhiguang.liu at intel.com>
> >> 主题: Re: [edk2-devel] [PATCH 1/2] MdePkg: Update Base.h to be compliant
> >> with C11
> >>
> >> Now that edk2-stable202302 has been released, I'd like to get this patch
> >> series committed.
> >>
> >>
> >> --
> >> Rebecca Cran
> >>
> >>
> >> On 2/9/23 8:45 AM, Rebecca Cran wrote:
> >>> With the introduction of the use of _Static_assert, edk2 requires a C11
> >>> compatible compiler. Update Include/Base.h to be compliant with C11.
> >>>
> >>> As of C11, the maximum type of an enum is type `int`. Since the UEFI
> >>> Specification 2.3.1 Errata C allows either `int` or `unsigned int`, fix
> >>> the 32-bit enum check to use a signed int.
> >>>
> >>> Since the UEFI 2.3 Specification only allowed signed int, update the
> >>> comment to reference 2.3.1 Errata C where the change was made to allow
> >>> unsigned int.
> >>>
> >>> Signed-off-by: Rebecca Cran <rebecca at quicinc.com>
> >>> ---
> >>>    MdePkg/Include/Base.h | 12 ++++++------
> >>>    1 file changed, 6 insertions(+), 6 deletions(-)
> >>>
> >>> diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
> >>> index d209e6de280a..e89c84962ab2 100644
> >>> --- a/MdePkg/Include/Base.h
> >>> +++ b/MdePkg/Include/Base.h
> >>> @@ -796,9 +796,9 @@ STATIC_ASSERT (sizeof (L"A")    == 4, "sizeof
> >> (L\"A\") does not meet UEFI Specif
> >>>    //
> >>>    // The following three enum types are used to verify that the compiler
> >>>    // configuration for enum types is compliant with Section 2.3.1 of the
> >>> -// UEFI 2.3 Specification. These enum types and enum values are not
> >>> -// intended to be used. A prefix of '__' is used avoid conflicts with
> >>> -// other types.
> >>> +// UEFI 2.3.1 Errata C Specification. These enum types and enum values
> >>> +// are not intended to be used. A prefix of '__' is used avoid
> >>> +// conflicts with other types.
> >>>    //
> >>>    typedef enum {
> >>>      __VerifyUint8EnumValue = 0xff
> >>> @@ -809,12 +809,12 @@ typedef enum {
> >>>    } __VERIFY_UINT16_ENUM_SIZE;
> >>>
> >>>    typedef enum {
> >>> -  __VerifyUint32EnumValue = 0xffffffff
> >>> -} __VERIFY_UINT32_ENUM_SIZE;
> >>> +  __VerifyInt32EnumValue = 0x7fffffff
> >>> +} __VERIFY_INT32_ENUM_SIZE;
> >>>
> >>>    STATIC_ASSERT (sizeof (__VERIFY_UINT8_ENUM_SIZE) == 4, "Size of
> >> enum does not meet UEFI Specification Data Type requirements");
> >>>    STATIC_ASSERT (sizeof (__VERIFY_UINT16_ENUM_SIZE) == 4, "Size of
> >> enum does not meet UEFI Specification Data Type requirements");
> >>> -STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of
> >> enum does not meet UEFI Specification Data Type requirements");
> >>> +STATIC_ASSERT (sizeof (__VERIFY_INT32_ENUM_SIZE) == 4, "Size of enum
> >> does not meet UEFI Specification Data Type requirements");
> >>>    /**
> >>>      Macro that returns a pointer to the data structure that contains a
> >> specified field of
> >
> >
> >
> > 
> >
> >


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101150): https://edk2.groups.io/g/devel/message/101150
Mute This Topic: https://groups.io/mt/97512071/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3943202/1813853/130120423/xyzzy [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list