REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2048
Use new STATIC_ASSERT macro instead of VERIFY_SIZE_OF.
Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
---
MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
index 2b5af4b95a..bb151d0331 100644
--- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
+++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
@@ -20,7 +20,10 @@ typedef struct {
} RESET_UTILITY_GUID_SPECIFIC_RESET_DATA;
#pragma pack()
-VERIFY_SIZE_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, 18);
+STATIC_ASSERT (
+ sizeof (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA) == 18,
+ "sizeof (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA) is expected to be 18 bytes"
+ );
/**
This is a shorthand helper function to reset with reset type and a subtype
--
2.20.1 (Apple Git-117)
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#45870): https://edk2.groups.io/g/devel/message/45870
Mute This Topic: https://groups.io/mt/32918009/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Vitaly Cheptsov via Groups.Io
> Sent: Saturday, August 17, 2019 7:58 AM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH v1 1/3] MdeModulePkg/ResetUtilityLib: Use
> STATIC_ASSERT macro
>
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2048
>
> Use new STATIC_ASSERT macro instead of VERIFY_SIZE_OF.
>
> Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
> ---
> MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> index 2b5af4b95a..bb151d0331 100644
> --- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> +++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> @@ -20,7 +20,10 @@ typedef struct {
> } RESET_UTILITY_GUID_SPECIFIC_RESET_DATA;
> #pragma pack()
>
> -VERIFY_SIZE_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, 18);
> +STATIC_ASSERT (
> + sizeof (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA) == 18,
> + "sizeof (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA) is expected to be
> 18 bytes"
> + );
Thanks for the patch,
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Best Regards,
Hao Wu
>
> /**
> This is a shorthand helper function to reset with reset type and a subtype
> --
> 2.20.1 (Apple Git-117)
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#45870): https://edk2.groups.io/g/devel/message/45870
> Mute This Topic: https://groups.io/mt/32918009/1768737
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [hao.a.wu@intel.com]
> -=-=-=-=-=-=
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#47309): https://edk2.groups.io/g/devel/message/47309
Mute This Topic: https://groups.io/mt/32918009/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Vitaly Cheptsov via Groups.Io
> Sent: Saturday, August 17, 2019 7:58 AM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH v1 1/3] MdeModulePkg/ResetUtilityLib: Use
> STATIC_ASSERT macro
>
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2048
>
> Use new STATIC_ASSERT macro instead of VERIFY_SIZE_OF.
>
> Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
> ---
> MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> index 2b5af4b95a..bb151d0331 100644
> --- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> +++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> @@ -20,7 +20,10 @@ typedef struct {
> } RESET_UTILITY_GUID_SPECIFIC_RESET_DATA;
> #pragma pack()
>
> -VERIFY_SIZE_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, 18);
> +STATIC_ASSERT (
> + sizeof (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA) == 18,
> + "sizeof (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA) is expected to be
> 18 bytes"
> + );
>
> /**
> This is a shorthand helper function to reset with reset type and a subtype
> --
> 2.20.1 (Apple Git-117)
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#45870): https://edk2.groups.io/g/devel/message/45870
> Mute This Topic: https://groups.io/mt/32918009/1768756
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [zhichao.gao@intel.com]
> -=-=-=-=-=-=
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#47312): https://edk2.groups.io/g/devel/message/47312
Mute This Topic: https://groups.io/mt/32918009/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.