From 049cbaa3a00b9e215ebee70f1b64cda62910c695 Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Mon, 10 Dec 2018 04:58:11 -0800 Subject: [PATCH] Ignore expansion-to-defined warning from dlmalloc include system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:588:22: note: expanded from macro 'USE_LOCKS' #define USE_LOCKS ((defined(USE_SPIN_LOCKS) && USE_SPIN_LOCKS != 0) || \ ^ system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:2742:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined] system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:589:22: note: expanded from macro 'USE_LOCKS' (defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0)) Test: m checkbuild Bug: 29823425 Change-Id: I3acbcb9c9cab3713041fc130358f7ecdec70a589 --- libpixelflinger/codeflinger/CodeCache.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libpixelflinger/codeflinger/CodeCache.cpp b/libpixelflinger/codeflinger/CodeCache.cpp index 851664070..5ed668c6f 100644 --- a/libpixelflinger/codeflinger/CodeCache.cpp +++ b/libpixelflinger/codeflinger/CodeCache.cpp @@ -61,7 +61,10 @@ static void heap_error(const char* msg, const char* function, void* p); #define USAGE_ERROR_ACTION(m,p) \ heap_error("ARGUMENT IS INVALID HEAP ADDRESS", __FUNCTION__, p) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wexpansion-to-defined" #include "../../../../external/dlmalloc/malloc.c" +#pragma GCC diagnostic pop static void heap_error(const char* msg, const char* function, void* p) { ALOG(LOG_FATAL, LOG_TAG, "@@@ ABORTING: CODE FLINGER: %s IN %s addr=%p",