OSDN Git Service

Fix gcc test issues.
authorChristopher Ferris <cferris@google.com>
Tue, 26 Jan 2016 01:23:38 +0000 (17:23 -0800)
committerChristopher Ferris <cferris@google.com>
Tue, 26 Jan 2016 01:27:40 +0000 (17:27 -0800)
Change-Id: I2b26b779f5198c7c9362a452b971260a8852aa7b

libc/malloc_debug/Android.mk
libc/malloc_debug/tests/malloc_debug_unit_tests.cpp

index 4c2c7f3..3eb0790 100644 (file)
@@ -72,5 +72,6 @@ LOCAL_SHARED_LIBRARIES := libbase
 LOCAL_CFLAGS := \
     -Wall \
     -Werror \
+    -Wno-error=format-zero-length \
 
 include $(BUILD_NATIVE_TEST)
index 0e8ca68..08731c2 100644 (file)
@@ -111,14 +111,20 @@ class MallocDebugTest : public ::testing::Test {
 };
 
 MallocDispatch MallocDebugTest::dispatch = {
-  .calloc = calloc,
-  .free = free,
-  .mallinfo = mallinfo,
-  .malloc = malloc,
-  .malloc_usable_size = malloc_usable_size,
-  .memalign = memalign,
-  .posix_memalign = posix_memalign,
-  .realloc = realloc,
+  calloc,
+  free,
+  mallinfo,
+  malloc,
+  malloc_usable_size,
+  memalign,
+  posix_memalign,
+#if defined(HAVE_DEPRECATED_MALLOC_FUNCS)
+  nullptr,
+#endif
+  realloc,
+#if defined(HAVE_DEPRECATED_MALLOC_FUNCS)
+  nullptr,
+#endif
 };
 
 void VerifyAllocCalls() {