Add missing nothrow attribute
The upcoming compiler update emits warning about the missing nothrow
attribute:
bionic/libc/bionic/jemalloc.h:33:5: error: 'je_mallctl' is missing exception specification '__attribute__((nothrow))' [-Werror,-Wmissing-exception-spec]
int je_mallctl(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
^
__attribute__((nothrow))
external/jemalloc_new/include/jemalloc/jemalloc.h:230:38: note: previous declaration is here
JEMALLOC_EXPORT int JEMALLOC_NOTHROW je_mallctl(const char *name,
^
external/jemalloc_new/include/jemalloc/jemalloc_rename.h:12:22: note: expanded from macro 'je_mallctl'
# define je_mallctl je_mallctl
Test: build with clang r365631
Bug: 131328001
Change-Id: Ia8b6f47d38e5a003b6282f10724b65b1f971ba84
diff --git a/libc/bionic/jemalloc.h b/libc/bionic/jemalloc.h
index b9a4e99..ef77c9c 100644
--- a/libc/bionic/jemalloc.h
+++ b/libc/bionic/jemalloc.h
@@ -30,7 +30,7 @@
void* je_aligned_alloc_wrapper(size_t, size_t);
int je_iterate(uintptr_t, size_t, void (*)(uintptr_t, size_t, void*), void*);
-int je_mallctl(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
+int je_mallctl(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen) __attribute__((nothrow));
struct mallinfo je_mallinfo();
void je_malloc_disable();
void je_malloc_enable();