]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Drop VERIFY_SIZE_OF in favour of STATIC_ASSERT
authorVitaly Cheptsov via Groups.Io <vit9696=protonmail.com@groups.io>
Fri, 16 Aug 2019 23:58:12 +0000 (07:58 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 17 Sep 2019 01:39:01 +0000 (09:39 +0800)
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2048

New STATIC_ASSERT macro supersedes VERIFY_SIZE_OF as being more functional.

Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Include/Base.h

index d871422cd690b6d671346ccb7ef9536f9c4d95df..ed85b98318b82b0fdfaed10a8676dad8e5e770ea 100644 (file)
@@ -28,19 +28,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #pragma warning ( disable : 4200 )\r
 #endif\r
 \r
-/**\r
-  Verifies the storage size of a given data type.\r
-\r
-  This macro generates a divide by zero error or a zero size array declaration in\r
-  the preprocessor if the size is incorrect.  These are declared as "extern" so\r
-  the space for these arrays will not be in the modules.\r
-\r
-  @param  TYPE  The date type to determine the size of.\r
-  @param  Size  The expected size for the TYPE.\r
-\r
-**/\r
-#define VERIFY_SIZE_OF(TYPE, Size) extern UINT8 _VerifySizeof##TYPE[(sizeof(TYPE) == (Size)) / (sizeof(TYPE) == (Size))]\r
-\r
 //\r
 // The Microsoft* C compiler can removed references to unreferenced data items\r
 //  if the /OPT:REF linker option is used. We defined a macro as this is a\r