[libpng16] Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler

(Bug report by Viktor Szaka'ts).
This commit is contained in:
Glenn Randers-Pehrson
2015-04-01 12:06:01 -05:00
parent 507a8cdc5e
commit c861dc8923
10 changed files with 31 additions and 21 deletions

View File

@@ -77,6 +77,9 @@ png_malloc_base,(png_const_structrp png_ptr, png_alloc_size_t size),
PNG_UNUSED(png_ptr)
#endif
/* Some compilers complain that this is always true. However, it
* can be false when integer overflow happens.
*/
if (size > 0 && size <= PNG_SIZE_MAX
# ifdef PNG_MAX_MALLOC_64K
&& size <= 65536U