[libpng16] Eliminated Intel icc/icl compiler warnings. The Intel (GCC derived)

compiler issues slightly different warnings from those issued by the
current vesions of GCC. This eliminates those warnings by
adding/removing casts and small code rewrites.
This commit is contained in:
John Bowler
2012-01-25 07:47:44 -06:00
committed by Glenn Randers-Pehrson
parent 9c7f99c9cb
commit 8fb6c6a9b3
9 changed files with 125 additions and 104 deletions

View File

@@ -3315,8 +3315,9 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
v = (png_byte)((*sp >> sshift) & 0x01);
for (j = 0; j < jstop; j++)
{
*dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff);
*dp |= (png_byte)(v << dshift);
unsigned int tmp = *dp & (0x7f7f >> (7 - dshift));
tmp |= v << dshift;
*dp = (png_byte)(tmp & 0xff);
if (dshift == s_end)
{
@@ -3377,8 +3378,9 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
v = (png_byte)((*sp >> sshift) & 0x03);
for (j = 0; j < jstop; j++)
{
*dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff);
*dp |= (png_byte)(v << dshift);
unsigned int tmp = *dp & (0x3f3f >> (6 - dshift));
tmp |= v << dshift;
*dp = (png_byte)(tmp & 0xff);
if (dshift == s_end)
{
@@ -3438,8 +3440,9 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
for (j = 0; j < jstop; j++)
{
*dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff);
*dp |= (png_byte)(v << dshift);
unsigned int tmp = *dp & (0xf0f >> (4 - dshift));
tmp |= v << dshift;
*dp = (png_byte)(tmp & 0xff);
if (dshift == s_end)
{