From: Martin Baute Date: Fri, 11 Mar 2016 07:06:50 +0000 (+0100) Subject: Redeclaration of standard functions by dlmalloc. Fixed. Re-enabled warnings in Jamrules. X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=3a988bf47bda2322d7759d3c4518c03e0ef98ba4;hp=6d8ab22315929ce3c33509be3492dc067c3b1c19 Redeclaration of standard functions by dlmalloc. Fixed. Re-enabled warnings in Jamrules. --- diff --git a/Jamrules b/Jamrules index d04c45d..47f1ef8 100644 --- a/Jamrules +++ b/Jamrules @@ -31,15 +31,11 @@ if $(PDCLIB_TOOLCHAIN) = "" { } if $(PDCLIB_TOOLCHAIN) = "gcc" { - # No -Wcast-align : spurious warnings when using char* to do pointer - # arithmetic - # No -Winline : when compiling with e.g. -Os causes spurious - # warnings that call is unlikely/code size would grow - # No -Wredundant-decls : some functions must be multiply defined PDCLIB_WARNINGS ?= -Wall -Wextra -pedantic -Wno-unused-parameter -Wshadow -Wpointer-arith -Wwrite-strings -Wmissing-declarations -Wno-long-long - -Wuninitialized + -Wuninitialized -Wno-deprecated-declarations -Wredundant-decls -Winline + -Wcast-align ; PDCLIB_CCWARNINGS ?= -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes ; @@ -203,4 +199,4 @@ rule MakeLocate Depends $(<) : $(_dir:G=dir) ; MkDir $(_dir:G=dir) ; } -} \ No newline at end of file +} diff --git a/opt/dlmalloc/dlmalloc.c b/opt/dlmalloc/dlmalloc.c index 18cf0d6..865b5b9 100644 --- a/opt/dlmalloc/dlmalloc.c +++ b/opt/dlmalloc/dlmalloc.c @@ -835,6 +835,8 @@ extern "C" { #define dlbulk_free bulk_free #endif /* USE_DL_PREFIX */ +#if 0 // Redeclaration warnings as PDCLib already declares these in + /* malloc(size_t n) Returns a pointer to a newly allocated chunk of at least n bytes, or @@ -891,6 +893,8 @@ DLMALLOC_EXPORT void* dlcalloc(size_t, size_t); */ DLMALLOC_EXPORT void* dlrealloc(void*, size_t); +#endif + /* realloc_in_place(void* p, size_t n) Resizes the space allocated for p to size n, only if this can be