summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--lib/lz4.c4
-rw-r--r--tests/fullbench.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index 31bc675..f201d52 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,6 +38,8 @@ matrix:
- make -C programs lz4-wlib
- make clean
- make -C tests fullbench-wmalloc # test LZ4_USER_MEMORY_FUNCTIONS
+ - make clean
+ - CC="c++ -Wno-deprecated" make -C tests fullbench-wmalloc # stricter function signature check
- name: (Precise) g++ and clang CMake test
dist: precise
diff --git a/lib/lz4.c b/lib/lz4.c
index 128e7b2..5fe3433 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -193,10 +193,10 @@
* Below functions must exist somewhere in the Project
* and be available at link time */
void* LZ4_malloc(size_t s);
-void* LZ4_calloc(size_t s);
+void* LZ4_calloc(size_t n, size_t s);
void LZ4_free(void* p);
# define ALLOC(s) LZ4_malloc(s)
-# define ALLOC_AND_ZERO(s) LZ4_calloc(s)
+# define ALLOC_AND_ZERO(s) LZ4_calloc(1,s)
# define FREEMEM(p) LZ4_free(p)
#else
# include <stdlib.h> /* malloc, calloc, free */
diff --git a/tests/fullbench.c b/tests/fullbench.c
index 39932d2..181128e 100644
--- a/tests/fullbench.c
+++ b/tests/fullbench.c
@@ -159,7 +159,7 @@ static size_t BMK_findMaxMem(U64 requiredMem)
* Memory management, to test LZ4_USER_MEMORY_FUNCTIONS
*********************************************************/
void* LZ4_malloc(size_t s) { return malloc(s); }
-void* LZ4_calloc(size_t s) { return calloc(1,s); }
+void* LZ4_calloc(size_t n, size_t s) { (void)n; return calloc(1,s); }
void LZ4_free(void* p) { free(p); }