mirror of https://github.com/acidanthera/audk.git
Update BASE_ARG() macro to pass static analysis tools. This change should not cause any changes in behavior
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8707 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
04dd6cc01a
commit
2229029afc
|
@ -414,6 +414,15 @@ typedef CHAR8 *VA_LIST;
|
||||||
///
|
///
|
||||||
typedef UINTN *BASE_LIST;
|
typedef UINTN *BASE_LIST;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the size of a data type in sizeof(UINTN) units rounded up to the nearest UINTN boundary.
|
||||||
|
|
||||||
|
@param TYPE The date type to determine the size of.
|
||||||
|
|
||||||
|
@return The size of TYPE in sizeof (UINTN) units rounded up to the nearest UINTN boundary.
|
||||||
|
**/
|
||||||
|
#define _BASE_INT_SIZE_OF(TYPE) ((sizeof (TYPE) + sizeof (UINTN) - 1) / sizeof (UINTN))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns an argument of a specified type from a variable argument list and updates
|
Returns an argument of a specified type from a variable argument list and updates
|
||||||
the pointer to the variable argument list to point to the next argument.
|
the pointer to the variable argument list to point to the next argument.
|
||||||
|
@ -430,7 +439,7 @@ typedef UINTN *BASE_LIST;
|
||||||
@return An argument of the type specified by TYPE.
|
@return An argument of the type specified by TYPE.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
#define BASE_ARG(Marker, TYPE) (*(TYPE *)((UINT8 *)(Marker = (BASE_LIST)((UINT8 *)Marker + _INT_SIZE_OF (TYPE))) - _INT_SIZE_OF (TYPE)))
|
#define BASE_ARG(Marker, TYPE) (*(TYPE *) ((Marker += _BASE_INT_SIZE_OF (TYPE)) - _BASE_INT_SIZE_OF (TYPE)))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Macro that returns the byte offset of a field in a data structure.
|
Macro that returns the byte offset of a field in a data structure.
|
||||||
|
|
Loading…
Reference in New Issue