From 89d3fdcae26980bf81a4622c3c83e48ead4c1c3a Mon Sep 17 00:00:00 2001 From: Bruce Beare Date: Wed, 21 Sep 2011 12:44:05 +0200 Subject: [PATCH] MALLOC_DEBUG: enable the option libc.debug.malloc = 10 Fix the compile warning to let the libc.debug.malloc=10 works well Due to unsuitable value comparison, which cause compiler optimize the code of comparing two digits. Change-Id: I0bedd596c9ca2ba308fb008da20ecb328d8548f5 Signed-off-by: Bruce Beare Author: liu chuansheng --- libc/bionic/malloc_debug_leak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/bionic/malloc_debug_leak.c b/libc/bionic/malloc_debug_leak.c index 0a3a68daf..e0bcee946 100644 --- a/libc/bionic/malloc_debug_leak.c +++ b/libc/bionic/malloc_debug_leak.c @@ -263,7 +263,7 @@ int get_backtrace(intptr_t* addrs, size_t max_entries) // ============================================================================= #define CHK_FILL_FREE 0xef -#define CHK_SENTINEL_VALUE 0xeb +#define CHK_SENTINEL_VALUE (char)0xeb #define CHK_SENTINEL_HEAD_SIZE 16 #define CHK_SENTINEL_TAIL_SIZE 16 #define CHK_OVERHEAD_SIZE ( CHK_SENTINEL_HEAD_SIZE + \ -- 2.11.0