]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
ZWRAP_allocFunction and ZWRAP_freeFunction are static
authorinikep <inikep@gmail.com>
Thu, 2 Jun 2016 16:24:07 +0000 (18:24 +0200)
committerinikep <inikep@gmail.com>
Thu, 2 Jun 2016 16:24:07 +0000 (18:24 +0200)
Makefile
programs/zbufftest.c
zlibWrapper/zstd_zlibwrapper.c

index db58d430c470610862234e22670fb882a95cf10a..c8b5831bac86d7962e26ef203bd62d05e6a553df 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -106,7 +106,7 @@ ppctest: clean
 
 # for Travis CI
 ppcinstall: clean
-       sudo apt-get update  -y -q
+       sudo apt-get update  -y -q
        sudo apt-get install -y -q qemu-system-ppc binfmt-support qemu-user-static gcc-powerpc-linux-gnu  # doesn't work with Ubuntu 12.04
 
 # for Travis CI
index 18382abf9313dbb001dd801538ce990b56299174..b1d5b47c53734a9be87a9d25e99f269116d0bf20 100644 (file)
@@ -129,7 +129,7 @@ static unsigned FUZ_highbit32(U32 v32)
 }
 */
 
-void* ZBUFF_allocFunction(void* opaque, size_t size)
+static void* ZBUFF_allocFunction(void* opaque, size_t size)
 {
     (void)opaque;
     void* address = malloc(size);
@@ -137,7 +137,7 @@ void* ZBUFF_allocFunction(void* opaque, size_t size)
     return address;
 }
 
-void ZBUFF_freeFunction(void* opaque, void* address)
+static void ZBUFF_freeFunction(void* opaque, void* address)
 {
     (void)opaque;
     /* if (address) DISPLAYLEVEL(4, "free %p opaque=%p \n", address, opaque); */
@@ -514,7 +514,7 @@ int main(int argc, const char** argv)
     int result=0;
     U32 mainPause = 0;
     const char* programName = argv[0];
-    ZSTD_customMem customMem = { ZBUFF_allocFunction, ZBUFF_freeFunction, (void*)777 };
+    ZSTD_customMem customMem = { ZBUFF_allocFunction, ZBUFF_freeFunction, NULL };
     ZSTD_customMem customNULL = { NULL, NULL, NULL };
 
     /* Check command line */
index 26f173b131b10a3ffb96cec41ad39adcade7588a..b55b760afa321701051e96d66bb861af80ef6f8f 100644 (file)
@@ -76,7 +76,7 @@ const char * zstdVersion() { return ZSTD_VERSION_STRING; }
 ZEXTERN const char * ZEXPORT z_zlibVersion OF((void)) { return zlibVersion();  }
 
 
-void* ZWRAP_allocFunction(void* opaque, size_t size)
+static void* ZWRAP_allocFunction(void* opaque, size_t size)
 {
     z_streamp strm = (z_streamp) opaque;
     void* address = strm->zalloc(strm->opaque, 1, size);
@@ -84,7 +84,7 @@ void* ZWRAP_allocFunction(void* opaque, size_t size)
     return address;
 }
 
-void ZWRAP_freeFunction(void* opaque, void* address)
+static void ZWRAP_freeFunction(void* opaque, void* address)
 {
     z_streamp strm = (z_streamp) opaque;
     strm->zfree(strm->opaque, address);