diff --git a/libc/malloc_debug/Android.mk b/libc/malloc_debug/Android.mk index 4c2c7f31a..3eb079081 100644 --- a/libc/malloc_debug/Android.mk +++ b/libc/malloc_debug/Android.mk @@ -72,5 +72,6 @@ LOCAL_SHARED_LIBRARIES := libbase LOCAL_CFLAGS := \ -Wall \ -Werror \ + -Wno-error=format-zero-length \ include $(BUILD_NATIVE_TEST) diff --git a/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp b/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp index 0e8ca68ee..08731c236 100644 --- a/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp +++ b/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp @@ -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() {