libz warning fixes
This commit is contained in:
parent
700394025d
commit
5e1c1b8b99
@ -405,7 +405,7 @@ AC_ARG_WITH(libz,
|
|||||||
CPPFLAGS="$CPPFLAGS -DHAVE_LIBZ"
|
CPPFLAGS="$CPPFLAGS -DHAVE_LIBZ"
|
||||||
LIBS="$LIBS -lz"
|
LIBS="$LIBS -lz"
|
||||||
|
|
||||||
AC_TRY_LINK([#include <zlib.h>], [ deflateInit(NULL, 8); ],
|
AC_TRY_LINK([#include <zlib.h>], [ deflateInit(0, 8); ],
|
||||||
[ libz_linked=yes ], [ libz_linked=no ])
|
[ libz_linked=yes ], [ libz_linked=no ])
|
||||||
|
|
||||||
if test "x$libz_linked" == "xno" ; then
|
if test "x$libz_linked" == "xno" ; then
|
||||||
@ -419,7 +419,7 @@ AC_ARG_WITH(libz,
|
|||||||
LDFLAGS="$LDFLAGS -L$trylibzdir/lib"
|
LDFLAGS="$LDFLAGS -L$trylibzdir/lib"
|
||||||
CPPFLAGS="$CPPFLAGS -I$trylibzdir/include"
|
CPPFLAGS="$CPPFLAGS -I$trylibzdir/include"
|
||||||
|
|
||||||
AC_TRY_LINK([#include <zlib.h>], [ deflateInit(NULL, 8); ],
|
AC_TRY_LINK([#include <zlib.h>], [ deflateInit(0, 8); ],
|
||||||
[ libz_linked=yes ], [ libz_linked=no ])
|
[ libz_linked=yes ], [ libz_linked=no ])
|
||||||
|
|
||||||
if test "x$libz_linked" == "xno" ; then
|
if test "x$libz_linked" == "xno" ; then
|
||||||
|
@ -212,14 +212,16 @@ static INLINE void ato32(const byte* c, word32* u32)
|
|||||||
#ifdef HAVE_LIBZ
|
#ifdef HAVE_LIBZ
|
||||||
|
|
||||||
/* alloc user allocs to work with zlib */
|
/* alloc user allocs to work with zlib */
|
||||||
void* myAlloc(void* opaque, unsigned int item, unsigned int size)
|
static void* myAlloc(void* opaque, unsigned int item, unsigned int size)
|
||||||
{
|
{
|
||||||
|
(void)opaque;
|
||||||
return XMALLOC(item * size, opaque, DYNAMIC_TYPE_LIBZ);
|
return XMALLOC(item * size, opaque, DYNAMIC_TYPE_LIBZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void myFree(void* opaque, void* memory)
|
static void myFree(void* opaque, void* memory)
|
||||||
{
|
{
|
||||||
|
(void)opaque;
|
||||||
XFREE(memory, opaque, DYNAMIC_TYPE_LIBZ);
|
XFREE(memory, opaque, DYNAMIC_TYPE_LIBZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user