[edk2-devel] [PATCH v1 1/3] MdeModulePkg/ResetUtilityLib: Use STATIC_ASSERT macro

Gao, Zhichao zhichao.gao at intel.com
Tue Sep 17 01:07:07 UTC 2019


Reviewed-by: Zhichao Gao <zhichao.gao at intel.com>

> -----Original Message-----
> From: devel at edk2.groups.io [mailto:devel at edk2.groups.io] On Behalf Of
> Vitaly Cheptsov via Groups.Io
> Sent: Saturday, August 17, 2019 7:58 AM
> To: devel at 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 at 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 at edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [zhichao.gao at 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/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list