From d2d798d0f11abcbf141db69869e76e8d123ec1eb Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 13 Dec 2014 20:28:24 +0000 Subject: FreeImage updated to 3.16 git-svn-id: http://svn.miranda-ng.org/main/trunk@11379 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AdvaImg/src/LibPNG/pngmem.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plugins/AdvaImg/src/LibPNG/pngmem.c') diff --git a/plugins/AdvaImg/src/LibPNG/pngmem.c b/plugins/AdvaImg/src/LibPNG/pngmem.c index adae736699..ba643a9fb1 100644 --- a/plugins/AdvaImg/src/LibPNG/pngmem.c +++ b/plugins/AdvaImg/src/LibPNG/pngmem.c @@ -1,7 +1,7 @@ /* pngmem.c - stub functions for memory allocation * - * Last changed in libpng 1.6.0 [February 14, 2013] + * Last changed in libpng 1.6.8 [December 19, 2013] * Copyright (c) 1998-2013 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -73,9 +73,10 @@ png_malloc_base,(png_const_structrp png_ptr, png_alloc_size_t size), * to implement a user memory handler. This checks to be sure it isn't * called with big numbers. */ -#ifdef PNG_USER_MEM_SUPPORTED +#ifndef PNG_USER_MEM_SUPPORTED PNG_UNUSED(png_ptr) #endif + if (size > 0 && size <= PNG_SIZE_MAX # ifdef PNG_MAX_MALLOC_64K && size <= 65536U @@ -95,6 +96,8 @@ png_malloc_base,(png_const_structrp png_ptr, png_alloc_size_t size), return NULL; } +#if defined(PNG_TEXT_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) ||\ + defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) /* This is really here only to work round a spurious warning in GCC 4.6 and 4.7 * that arises because of the checks in png_realloc_array that are repeated in * png_malloc_array. @@ -156,6 +159,7 @@ png_realloc_array,(png_const_structrp png_ptr, png_const_voidp old_array, return NULL; /* error */ } +#endif /* TEXT || sPLT || STORE_UNKNOWN_CHUNKS */ /* Various functions that have different error handling are derived from this. * png_malloc always exists, but if PNG_USER_MEM_SUPPORTED is defined a separate -- cgit v1.2.3