You-Cheng Syu uploaded patch set #2 to this change.

View Change

libpayload: Fix compile error with DEBUG_MALLOC

DEBUG_MALLOC is an option for debugging memory allocator issues.
However, we would encounter a lot of compile error if we turn it on in
environments with strict compile options (e.g., ChromeOS) or different
architecture (e.g., ARM64).

This CL:
1. Eliminate redundant redeclaration errors in memory allocation macros.
2. Include 'stdio.h' for printing debug messages.
3. Move the declaration of 'print_malloc_map' from 'malloc.c' to
'stdlib.h' for memory allocation macros.
4. Cast arguments to unsigned int when printing debug messages to
eliminate printf argument type errors.

BUG=b:125576961
TEST='emerge-kukui libpayload' succeeds with and without DEBUG_MALLOC

Change-Id: I5927f941f386d4920a5d41528b1471e5af294fcb
Signed-off-by: You-Cheng Syu <youcheng@google.com>
---
M payloads/libpayload/include/stdlib.h
M payloads/libpayload/libc/malloc.c
2 files changed, 38 insertions(+), 42 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/31562/2

To view, visit change 31562. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5927f941f386d4920a5d41528b1471e5af294fcb
Gerrit-Change-Number: 31562
Gerrit-PatchSet: 2
Gerrit-Owner: You-Cheng Syu <youcheng@google.com>
Gerrit-CC: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: newpatchset