summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yi Kong <yikong@google.com> 2017-12-20 17:06:02 -0800
committer Yi Kong <yikong@google.com> 2018-01-05 15:24:13 -0800
commit923a6943cbefb3effab3f739c154ed35c5870df4 (patch)
tree65d44769248ec34255bb66bdbf8ddbe56210b997
parentb496af808eaf3af5ebac50aef4fbec33323b5016 (diff)
Ignore null-pointer-arithmetic warnings in external/dlmalloc
Suppress new null-pointer-arithmetic warning introduced in next compiler update. Test: m checkbuild Change-Id: I3fe71ea24813a4759881a0a443c6d24025f73b25
-rw-r--r--runtime/gc/allocator/dlmalloc.cc1
-rw-r--r--runtime/gc/allocator/dlmalloc.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/runtime/gc/allocator/dlmalloc.cc b/runtime/gc/allocator/dlmalloc.cc
index 65062208d6..4570e9c1b8 100644
--- a/runtime/gc/allocator/dlmalloc.cc
+++ b/runtime/gc/allocator/dlmalloc.cc
@@ -37,6 +37,7 @@ static void art_heap_usage_error(const char* function, void* p);
#pragma GCC diagnostic ignored "-Wredundant-decls"
#pragma GCC diagnostic ignored "-Wempty-body"
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#pragma GCC diagnostic ignored "-Wnull-pointer-arithmetic"
#include "../../../external/dlmalloc/malloc.c"
// Note: malloc.c uses a DEBUG define to drive debug code. This interferes with the DEBUG severity
// of libbase, so undefine it now.
diff --git a/runtime/gc/allocator/dlmalloc.h b/runtime/gc/allocator/dlmalloc.h
index 29b96ee96c..b12691ad0e 100644
--- a/runtime/gc/allocator/dlmalloc.h
+++ b/runtime/gc/allocator/dlmalloc.h
@@ -32,6 +32,7 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wredundant-decls"
+#pragma GCC diagnostic ignored "-Wnull-pointer-arithmetic"
#include "../../external/dlmalloc/malloc.h"
#pragma GCC diagnostic pop