[EXTERNAL] [edk2-devel] [Patch 1/1] MdePkg/Include: Add STATIC_ASSERT for L'' and L"" strings
Michael D Kinney
michael.d.kinney at intel.com
Thu Jul 8 02:40:25 UTC 2021
The extra spaces are in purpose to align the ==
It looks correct with a fixed size font.
Mike
From: Kinney, Michael D <michael.d.kinney at intel.com>
Sent: Wednesday, July 7, 2021 7:20 PM
To: Bret Barkelew <Bret.Barkelew at microsoft.com>; devel at edk2.groups.io; Kinney, Michael D <michael.d.kinney at intel.com>
Cc: Liming Gao <gaoliming at byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu at intel.com>
Subject: RE: [EXTERNAL] [edk2-devel] [Patch 1/1] MdePkg/Include: Add STATIC_ASSERT for L'' and L"" strings
Hi Bret,
I will fix the extra spaces.
Thanks,
Mike
From: Bret Barkelew <Bret.Barkelew at microsoft.com<mailto:Bret.Barkelew at microsoft.com>>
Sent: Wednesday, July 7, 2021 4:00 PM
To: devel at edk2.groups.io<mailto:devel at edk2.groups.io>; Kinney, Michael D <michael.d.kinney at intel.com<mailto:michael.d.kinney at intel.com>>
Cc: Liming Gao <gaoliming at byosoft.com.cn<mailto:gaoliming at byosoft.com.cn>>; Liu, Zhiguang <zhiguang.liu at intel.com<mailto:zhiguang.liu at intel.com>>
Subject: RE: [EXTERNAL] [edk2-devel] [Patch 1/1] MdePkg/Include: Add STATIC_ASSERT for L'' and L"" strings
I like it.
Do you have an extra space after the (L’A’) and (L”A”)?
Reviewed-by: Bret Barkelew <bret.barkelew at microsoft.com<mailto:bret.barkelew at microsoft.com>>
- Bret
From: Michael D Kinney via groups.io<mailto:michael.d.kinney=intel.com at groups.io>
Sent: Wednesday, July 7, 2021 3:43 PM
To: devel at edk2.groups.io<mailto:devel at edk2.groups.io>
Cc: Liming Gao<mailto:gaoliming at byosoft.com.cn>; Zhiguang Liu<mailto:zhiguang.liu at intel.com>
Subject: [EXTERNAL] [edk2-devel] [Patch 1/1] MdePkg/Include: Add STATIC_ASSERT for L'' and L"" strings
Add STATIC_ASSERT() macros to verify that the compiler is
configured correctly for the use of L'' and L"" strings.
Cc: Liming Gao <gaoliming at byosoft.com.cn<mailto:gaoliming at byosoft.com.cn>>
Cc: Zhiguang Liu <zhiguang.liu at intel.com<mailto:zhiguang.liu at intel.com>>
Signed-off-by: Michael D Kinney <michael.d.kinney at intel.com<mailto:michael.d.kinney at intel.com>>
---
MdePkg/Include/Base.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index 8e4271f6eaf5..2da08b0c787f 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -6,7 +6,7 @@
environment. There are a set of base libraries in the Mde Package that can
be used to implement base modules.
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -821,6 +821,8 @@ STATIC_ASSERT (sizeof (INT64) == 8, "sizeof (INT64) does not meet UEFI Specifi
STATIC_ASSERT (sizeof (UINT64) == 8, "sizeof (UINT64) does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (CHAR8) == 1, "sizeof (CHAR8) does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (CHAR16) == 2, "sizeof (CHAR16) does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (sizeof (L'A') == 2, "sizeof (L'A') does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (sizeof (L"A") == 4, "sizeof (L\"A\") does not meet UEFI Specification Data Type requirements");
//
// The following three enum types are used to verify that the compiler
--
2.32.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77570): https://edk2.groups.io/g/devel/message/77570
Mute This Topic: https://groups.io/mt/84056904/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20210708/683bbe06/attachment.htm>
More information about the edk2-devel-archive
mailing list