mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Eliminate more GCC shadow warnings
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
1408c2afeb
commit
168a433352
8
pngset.c
8
pngset.c
@@ -87,7 +87,7 @@ png_set_cHRM(png_structp png_ptr, png_infop info_ptr,
|
||||
#ifdef PNG_gAMA_SUPPORTED
|
||||
void PNGFAPI
|
||||
png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point
|
||||
gamma)
|
||||
file_gamma)
|
||||
{
|
||||
png_debug1(1, "in %s storage function", "gAMA");
|
||||
|
||||
@@ -98,15 +98,15 @@ png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point
|
||||
* wrong, therefore storing them (and setting PNG_INFO_gAMA)
|
||||
* must be wrong too.
|
||||
*/
|
||||
if (gamma > (png_fixed_point)PNG_UINT_31_MAX)
|
||||
if (file_gamma > (png_fixed_point)PNG_UINT_31_MAX)
|
||||
png_warning(png_ptr, "Gamma too large, ignored");
|
||||
|
||||
else if (gamma <= 0)
|
||||
else if (file_gamma <= 0)
|
||||
png_warning(png_ptr, "Negative or zero gamma ignored");
|
||||
|
||||
else
|
||||
{
|
||||
info_ptr->gamma = gamma;
|
||||
info_ptr->gamma = file_gamma;
|
||||
info_ptr->valid |= PNG_INFO_gAMA;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user