mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[lipng17] Do not build png_product2() when it is unused and work around
one more Coverity-scan dead-code warning.
This commit is contained in:
17
pngread.c
17
pngread.c
@@ -2285,8 +2285,14 @@ png_image_read_colormap(png_voidp argument)
|
||||
output_processing = PNG_CMAP_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef __COVERITY__
|
||||
/* Coverity claims that output_encoding cannot be 2 (P_LINEAR)
|
||||
* here.
|
||||
*/
|
||||
back_alpha = 255;
|
||||
#else
|
||||
back_alpha = output_encoding == P_LINEAR ? 65535 : 255;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* output_processing means that the libpng-processed row will be
|
||||
@@ -2411,7 +2417,14 @@ png_image_read_colormap(png_voidp argument)
|
||||
*/
|
||||
background_index = i;
|
||||
png_create_colormap_entry(display, i++, back_r, back_g, back_b,
|
||||
output_encoding == P_LINEAR ? 65535U : 255U, output_encoding);
|
||||
#ifdef __COVERITY__
|
||||
/* Coverity claims that output_encoding cannot be 2 (P_LINEAR)
|
||||
* here.
|
||||
*/ 255U,
|
||||
#else
|
||||
output_encoding == P_LINEAR ? 65535U : 255U,
|
||||
#endif
|
||||
output_encoding);
|
||||
|
||||
/* For non-opaque input composite on the sRGB background - this
|
||||
* requires inverting the encoding for each component. The input
|
||||
|
||||
Reference in New Issue
Block a user