From: "Vitaly Cheptsov" <vit9696@protonmail.com>
To: devel@edk2.groups.io
Subject: [PATCH v1 1/3] MdeModulePkg/ResetUtilityLib: Use STATIC_ASSERT macro
Date: Fri, 16 Aug 2019 23:58:10 +0000 [thread overview]
Message-ID: <20190816235808.16019-2-vit9696@protonmail.com> (raw)
In-Reply-To: <20190816235808.16019-1-vit9696@protonmail.com>
[-- Attachment #1: Type: text/plain, Size: 1017 bytes --]
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)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]
next prev parent reply other threads:[~2019-08-16 23:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 23:58 [PATCH v1 0/3] Replace VERIFY_SIZE_OF with STATIC_ASSERT Vitaly Cheptsov
2019-08-16 23:58 ` Vitaly Cheptsov [this message]
2019-09-17 1:00 ` [edk2-devel] [PATCH v1 1/3] MdeModulePkg/ResetUtilityLib: Use STATIC_ASSERT macro Wu, Hao A
2019-09-17 1:07 ` Gao, Zhichao
2019-08-16 23:58 ` [PATCH v1 2/3] MdePkg: " Vitaly Cheptsov
2019-08-16 23:58 ` [PATCH v1 3/3] MdePkg: Drop VERIFY_SIZE_OF in favour of STATIC_ASSERT Vitaly Cheptsov
2019-09-09 0:54 ` [edk2-devel] [PATCH v1 0/3] Replace VERIFY_SIZE_OF with STATIC_ASSERT Liming Gao
[not found] ` <15C29F073B45A5F2.17179@groups.io>
2019-09-17 1:41 ` Liming Gao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190816235808.16019-2-vit9696@protonmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox