* [Patch 1/1] MdePkg/Include: Add STATIC_ASSERT for L'' and L"" strings @ 2021-07-07 22:43 Michael D Kinney 2021-07-07 23:00 ` [EXTERNAL] [edk2-devel] " Bret Barkelew 0 siblings, 1 reply; 5+ messages in thread From: Michael D Kinney @ 2021-07-07 22:43 UTC (permalink / raw) To: devel; +Cc: Liming Gao, Zhiguang Liu Add STATIC_ASSERT() macros to verify that the compiler is configured correctly for the use of L'' and L"" strings. Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@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 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [EXTERNAL] [edk2-devel] [Patch 1/1] MdePkg/Include: Add STATIC_ASSERT for L'' and L"" strings 2021-07-07 22:43 [Patch 1/1] MdePkg/Include: Add STATIC_ASSERT for L'' and L"" strings Michael D Kinney @ 2021-07-07 23:00 ` Bret Barkelew 2021-07-08 2:20 ` Michael D Kinney 0 siblings, 1 reply; 5+ messages in thread From: Bret Barkelew @ 2021-07-07 23:00 UTC (permalink / raw) To: devel@edk2.groups.io, Kinney, Michael D; +Cc: Liming Gao, Zhiguang Liu [-- Attachment #1: Type: text/plain, Size: 2232 bytes --] I like it. Do you have an extra space after the (L’A’) and (L”A”)? Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com> - Bret From: Michael D Kinney via groups.io<mailto:michael.d.kinney=intel.com@groups.io> Sent: Wednesday, July 7, 2021 3:43 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> Cc: Liming Gao<mailto:gaoliming@byosoft.com.cn>; Zhiguang Liu<mailto:zhiguang.liu@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@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@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 [-- Attachment #2: Type: text/html, Size: 4582 bytes --] ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [EXTERNAL] [edk2-devel] [Patch 1/1] MdePkg/Include: Add STATIC_ASSERT for L'' and L"" strings 2021-07-07 23:00 ` [EXTERNAL] [edk2-devel] " Bret Barkelew @ 2021-07-08 2:20 ` Michael D Kinney 2021-07-08 2:40 ` Michael D Kinney 0 siblings, 1 reply; 5+ messages in thread From: Michael D Kinney @ 2021-07-08 2:20 UTC (permalink / raw) To: Bret Barkelew, devel@edk2.groups.io, Kinney, Michael D Cc: Liming Gao, Liu, Zhiguang [-- Attachment #1: Type: text/plain, Size: 2793 bytes --] Hi Bret, I will fix the extra spaces. Thanks, Mike From: Bret Barkelew <Bret.Barkelew@microsoft.com> Sent: Wednesday, July 7, 2021 4:00 PM To: devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@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@microsoft.com<mailto:bret.barkelew@microsoft.com>> - Bret From: Michael D Kinney via groups.io<mailto:michael.d.kinney=intel.com@groups.io> Sent: Wednesday, July 7, 2021 3:43 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> Cc: Liming Gao<mailto:gaoliming@byosoft.com.cn>; Zhiguang Liu<mailto:zhiguang.liu@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@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>> Cc: Zhiguang Liu <zhiguang.liu@intel.com<mailto:zhiguang.liu@intel.com>> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@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 [-- Attachment #2: Type: text/html, Size: 42902 bytes --] ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [EXTERNAL] [edk2-devel] [Patch 1/1] MdePkg/Include: Add STATIC_ASSERT for L'' and L"" strings 2021-07-08 2:20 ` Michael D Kinney @ 2021-07-08 2:40 ` Michael D Kinney 2021-07-09 5:24 ` 回复: " gaoliming 0 siblings, 1 reply; 5+ messages in thread From: Michael D Kinney @ 2021-07-08 2:40 UTC (permalink / raw) To: Bret Barkelew, devel@edk2.groups.io, Kinney, Michael D Cc: Liming Gao, Liu, Zhiguang [-- Attachment #1: Type: text/plain, Size: 3465 bytes --] 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@intel.com> Sent: Wednesday, July 7, 2021 7:20 PM To: Bret Barkelew <Bret.Barkelew@microsoft.com>; devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@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@microsoft.com<mailto:Bret.Barkelew@microsoft.com>> Sent: Wednesday, July 7, 2021 4:00 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>> Cc: Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>; Liu, Zhiguang <zhiguang.liu@intel.com<mailto:zhiguang.liu@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@microsoft.com<mailto:bret.barkelew@microsoft.com>> - Bret From: Michael D Kinney via groups.io<mailto:michael.d.kinney=intel.com@groups.io> Sent: Wednesday, July 7, 2021 3:43 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> Cc: Liming Gao<mailto:gaoliming@byosoft.com.cn>; Zhiguang Liu<mailto:zhiguang.liu@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@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>> Cc: Zhiguang Liu <zhiguang.liu@intel.com<mailto:zhiguang.liu@intel.com>> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@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 [-- Attachment #2: Type: text/html, Size: 45539 bytes --] ^ permalink raw reply related [flat|nested] 5+ messages in thread
* 回复: [EXTERNAL] [edk2-devel] [Patch 1/1] MdePkg/Include: Add STATIC_ASSERT for L'' and L"" strings 2021-07-08 2:40 ` Michael D Kinney @ 2021-07-09 5:24 ` gaoliming 0 siblings, 0 replies; 5+ messages in thread From: gaoliming @ 2021-07-09 5:24 UTC (permalink / raw) To: devel, michael.d.kinney, 'Bret Barkelew'; +Cc: 'Liu, Zhiguang' [-- Attachment #1: Type: text/plain, Size: 4285 bytes --] Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Michael D Kinney 发送时间: 2021年7月8日 10:40 收件人: Bret Barkelew <Bret.Barkelew@microsoft.com>; devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com> 抄送: Liming Gao <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com> 主题: Re: [EXTERNAL] [edk2-devel] [Patch 1/1] MdePkg/Include: Add STATIC_ASSERT for L'' and L"" strings 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@intel.com <mailto:michael.d.kinney@intel.com> > Sent: Wednesday, July 7, 2021 7:20 PM To: Bret Barkelew <Bret.Barkelew@microsoft.com <mailto:Bret.Barkelew@microsoft.com> >; devel@edk2.groups.io <mailto:devel@edk2.groups.io> ; Kinney, Michael D <michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com> > Cc: Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> >; Liu, Zhiguang <zhiguang.liu@intel.com <mailto:zhiguang.liu@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@microsoft.com <mailto:Bret.Barkelew@microsoft.com> > Sent: Wednesday, July 7, 2021 4:00 PM To: devel@edk2.groups.io <mailto:devel@edk2.groups.io> ; Kinney, Michael D <michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com> > Cc: Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> >; Liu, Zhiguang <zhiguang.liu@intel.com <mailto:zhiguang.liu@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@microsoft.com <mailto:bret.barkelew@microsoft.com> > - Bret From: Michael D Kinney via groups.io <mailto:michael.d.kinney=intel.com@groups.io> Sent: Wednesday, July 7, 2021 3:43 PM To: devel@edk2.groups.io <mailto:devel@edk2.groups.io> Cc: Liming Gao <mailto:gaoliming@byosoft.com.cn> ; Zhiguang Liu <mailto:zhiguang.liu@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@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> > Cc: Zhiguang Liu <zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com> > Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com <mailto:michael.d.kinney@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 [-- Attachment #2: Type: text/html, Size: 10256 bytes --] ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-07-09 5:24 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-07-07 22:43 [Patch 1/1] MdePkg/Include: Add STATIC_ASSERT for L'' and L"" strings Michael D Kinney 2021-07-07 23:00 ` [EXTERNAL] [edk2-devel] " Bret Barkelew 2021-07-08 2:20 ` Michael D Kinney 2021-07-08 2:40 ` Michael D Kinney 2021-07-09 5:24 ` 回复: " gaoliming
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox