From a9521a6bf4382b9d6d7549d22f0b19a0b7d47b70 Mon Sep 17 00:00:00 2001 From: "Vitaly Cheptsov via Groups.Io" Date: Sat, 17 Aug 2019 07:58:10 +0800 Subject: [PATCH] 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 Reviewed-by: Liming Gao Reviewed-by: Zhichao Gao Reviewed-by: Hao A Wu --- 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