diff options
author | Phil Noh <Phil.Noh@amd.com> | 2024-12-20 13:56:11 -0600 |
---|---|---|
committer | Liming Gao <gaoliming@byosoft.com.cn> | 2025-01-07 09:28:02 +0800 |
commit | 7e03c40659fab2a96a8a4bb781101a945d3f857b (patch) | |
tree | 92aa2eda8cbde89a45d806ab0e57b084c3a19b9e /MdePkg | |
parent | f6e19abd978a0c7ad9d5eea11c1db34e2522b2b1 (diff) | |
download | edk2-7e03c40659fab2a96a8a4bb781101a945d3f857b.tar.gz |
MdePkg: Update BASE_CR macro in Base.h for a Coverity error
Coverity is a static analysis tool. It detects the macro as an error
(case to incompatible type, cert_exp39_c_violation). The update resolves
the error and supports compliance with the static analysis tool.
Signed-off-by: Phil Noh <Phil.Noh@amd.com>
Diffstat (limited to 'MdePkg')
-rw-r--r-- | MdePkg/Include/Base.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 363e0fea40..554f827fd1 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -888,7 +888,7 @@ STATIC_ASSERT (ALIGNOF (__VERIFY_INT32_ENUM_SIZE) == sizeof (__VERIFY_INT32_ENUM @return A pointer to the structure from one of it's elements.
**/
-#define BASE_CR(Record, TYPE, Field) ((TYPE *) ((CHAR8 *) (Record) - OFFSET_OF (TYPE, Field)))
+#define BASE_CR(Record, TYPE, Field) ((TYPE *) (VOID *) ((CHAR8 *) (Record) - OFFSET_OF (TYPE, Field)))
/**
Checks whether a value is a power of two.
|