[libpng17] Quiet a GCC compiler warning about sample_max in pngset.c

This commit is contained in:
Glenn Randers-Pehrson 2015-01-09 13:10:14 -06:00
parent 56e6741b25
commit d4ac328617

View File

@ -989,7 +989,7 @@ png_set_tRNS(png_structrp png_ptr, png_inforp info_ptr,
if (trans_color != NULL && info_ptr->bit_depth < 16) if (trans_color != NULL && info_ptr->bit_depth < 16)
{ {
png_uint_16 sample_max = (1 << info_ptr->bit_depth) - 1; unsigned int sample_max = (1U << info_ptr->bit_depth) - 1U;
if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY && if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY &&
trans_color->gray <= sample_max) || trans_color->gray <= sample_max) ||