Fix compilation warnings in mng.cpp

Enable autodetect mng support in configure.in
This commit is contained in:
Pali Rohár 2010-11-03 16:55:01 +01:00
parent 43c4c8d87f
commit 6481203460
2 changed files with 10 additions and 11 deletions

View file

@ -224,13 +224,13 @@ fi
dnl --- MNG --------------------
AC_ARG_WITH(mng,
[ --with-mng [Use mng (default: no)]])
if test "$with_mng" != "no" -a "x$with_mng" != "x"; then
[ --with-mng [Use mng (default: autodetect)]])
if test "$with_mng" != "no"; then
AC_CHECK_HEADER(libmng.h,, MNG=no)
if test "$MNG" != "no"; then
AC_CHECK_LIB(mng, main, CPPFLAGS="$CPPFLAGS -DUSE_MNG" LDFLAGS="$LDFLAGS -lmng", MNG=no)
fi
if test "$MNG" = "no"; then
if test "x$with_mng" != "x" -a "$MNG" = "no"; then
AC_MSG_ERROR(mng headers and/or libraries could not be found)
fi
fi

View file

@ -58,7 +58,7 @@ static mng_ptr MNG_DECL my_alloc(mng_size_t len)
return (mng_ptr)ptr;
}
static void MNG_DECL my_free(mng_ptr ptr, mng_size_t len)
static void MNG_DECL my_free(mng_ptr ptr, mng_size_t)
{
delete[] static_cast<char*>(ptr);
}
@ -162,8 +162,8 @@ static mng_ptr MNG_DECL my_getcanvasline(mng_handle handle, mng_uint32 linenr)
return mng->buffer + linenr * mng->surface->w * 3;
}
static mng_bool MNG_DECL my_refresh(mng_handle handle, mng_uint32 x, mng_uint32 y,
mng_uint32 width, mng_uint32 height)
static mng_bool MNG_DECL my_refresh(mng_handle handle, mng_uint32, mng_uint32,
mng_uint32, mng_uint32)
{
Mng *mng;
int i;
@ -184,7 +184,7 @@ static mng_bool MNG_DECL my_refresh(mng_handle handle, mng_uint32 x, mng_uint32
return MNG_TRUE;
}
static mng_uint32 MNG_DECL my_gettickcount(mng_handle handle)
static mng_uint32 MNG_DECL my_gettickcount(mng_handle)
{
return GetTicks();
}
@ -200,7 +200,7 @@ static mng_bool MNG_DECL my_settimer(mng_handle handle, mng_uint32 msecs)
}
static mng_bool MNG_DECL my_processmend(mng_handle handle, mng_uint32 iterationsdone,
mng_uint32 iterationsleft)
mng_uint32)
{
Mng *mng;
@ -210,9 +210,8 @@ static mng_bool MNG_DECL my_processmend(mng_handle handle, mng_uint32 iterations
return MNG_TRUE;
}
static mng_bool MNG_DECL my_errorproc(mng_handle handle, mng_int32 errorcode,
mng_int8 severity, mng_chunkid chunkname, mng_uint32 chunkseq,
mng_int32 extra1, mng_int32 extra2, mng_pchar errortext)
static mng_bool MNG_DECL my_errorproc(mng_handle handle, mng_int32,
mng_int8, mng_chunkid, mng_uint32, mng_int32, mng_int32, mng_pchar errortext)
{
Mng *mng;