diff options
author | Daryl McDaniel <daryl.mcdaniel@intel.com> | 2014-07-24 23:16:47 +0000 |
---|---|---|
committer | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-07-24 23:16:47 +0000 |
commit | 69c87efff4556df3aac9a12d869b0a9f131edd84 (patch) | |
tree | b61c242640ecdf983d4e9ae0257e35d908d8d57e /StdLib/LibC | |
parent | a33a2f62218e6e49a25d63474b7fe423d8ee4b71 (diff) | |
download | edk2-platforms-69c87efff4556df3aac9a12d869b0a9f131edd84.tar.xz |
StdLib/LibC/StdLib/Malloc.c: Revert cast removal to fix GCC build breakage.
The cast to (void**) is needed for the last parameter of the AllocatePool call in malloc(). This is because type CPOOL_HEAD** is not automatically promoted to void**, as required by AllocatePool().
This was originally addressed in SVN revision 15474 but removed again in 15664.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed by: Stefan Kaeser <stefankaeser@hotmail.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15677 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib/LibC')
-rw-r--r-- | StdLib/LibC/StdLib/Malloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/StdLib/LibC/StdLib/Malloc.c b/StdLib/LibC/StdLib/Malloc.c index 7d9718b266..c131b9ebf5 100644 --- a/StdLib/LibC/StdLib/Malloc.c +++ b/StdLib/LibC/StdLib/Malloc.c @@ -84,8 +84,8 @@ void * malloc(size_t Size)
{
CPOOL_HEAD *Head;
- void *RetVal;
- EFI_STATUS Status;
+ void *RetVal;
+ EFI_STATUS Status;
UINTN NodeSize;
if( Size == 0) {
@@ -98,7 +98,7 @@ malloc(size_t Size) DEBUG((DEBUG_POOL, "malloc(%d): NodeSz: %d", Size, NodeSize));
- Status = gBS->AllocatePool( EfiLoaderData, NodeSize, &Head);
+ Status = gBS->AllocatePool( EfiLoaderData, NodeSize, (void**)&Head);
if( Status != EFI_SUCCESS) {
RetVal = NULL;
errno = ENOMEM;
|