mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
f6e19abd97
commit
7e03c40659
|
@ -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.
|
@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.
|
Checks whether a value is a power of two.
|
||||||
|
|
Loading…
Reference in New Issue