libz warning fixes

This commit is contained in:
Todd A Ouska 2011-06-09 16:43:03 -07:00
parent 700394025d
commit 5e1c1b8b99
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -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);
} }