ZWRAP_allocFunction and ZWRAP_freeFunction are static
This commit is contained in:
@@ -106,7 +106,7 @@ ppctest: clean
|
|||||||
|
|
||||||
# for Travis CI
|
# for Travis CI
|
||||||
ppcinstall: clean
|
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
|
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
|
# for Travis CI
|
||||||
|
|||||||
@@ -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)opaque;
|
||||||
void* address = malloc(size);
|
void* address = malloc(size);
|
||||||
@@ -137,7 +137,7 @@ void* ZBUFF_allocFunction(void* opaque, size_t size)
|
|||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZBUFF_freeFunction(void* opaque, void* address)
|
static void ZBUFF_freeFunction(void* opaque, void* address)
|
||||||
{
|
{
|
||||||
(void)opaque;
|
(void)opaque;
|
||||||
/* if (address) DISPLAYLEVEL(4, "free %p opaque=%p \n", address, 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;
|
int result=0;
|
||||||
U32 mainPause = 0;
|
U32 mainPause = 0;
|
||||||
const char* programName = argv[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 };
|
ZSTD_customMem customNULL = { NULL, NULL, NULL };
|
||||||
|
|
||||||
/* Check command line */
|
/* Check command line */
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ const char * zstdVersion() { return ZSTD_VERSION_STRING; }
|
|||||||
ZEXTERN const char * ZEXPORT z_zlibVersion OF((void)) { return zlibVersion(); }
|
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;
|
z_streamp strm = (z_streamp) opaque;
|
||||||
void* address = strm->zalloc(strm->opaque, 1, size);
|
void* address = strm->zalloc(strm->opaque, 1, size);
|
||||||
@@ -84,7 +84,7 @@ void* ZWRAP_allocFunction(void* opaque, size_t size)
|
|||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZWRAP_freeFunction(void* opaque, void* address)
|
static void ZWRAP_freeFunction(void* opaque, void* address)
|
||||||
{
|
{
|
||||||
z_streamp strm = (z_streamp) opaque;
|
z_streamp strm = (z_streamp) opaque;
|
||||||
strm->zfree(strm->opaque, address);
|
strm->zfree(strm->opaque, address);
|
||||||
|
|||||||
Reference in New Issue
Block a user