[libpng15] Fixed compiler warnings with Intel and MSYS compilers.

The logical shift fix for Microsoft Visual C is required by other compilers,
so this enables that fix for all compilers when using compile-time constants.
Under MSYS 'byte' is a name declared in a system header file, so we
changed the name of a local variable to avoid the warnings that result.
This commit is contained in:
John Bowler
2011-10-27 19:36:08 -05:00
committed by Glenn Randers-Pehrson
parent cb75699dff
commit 92ef313c77
4 changed files with 29 additions and 15 deletions

View File

@@ -2484,8 +2484,8 @@ png_do_unshift(png_row_infop row_info, png_bytep row,
while (bp < bp_end)
{
int byte = (*bp >> 1) & 0x55;
*bp++ = (png_byte)byte;
int b = (*bp >> 1) & 0x55;
*bp++ = (png_byte)b;
}
break;
}
@@ -2503,8 +2503,8 @@ png_do_unshift(png_row_infop row_info, png_bytep row,
while (bp < bp_end)
{
int byte = (*bp >> gray_shift) & mask;
*bp++ = (png_byte)byte;
int b = (*bp >> gray_shift) & mask;
*bp++ = (png_byte)b;
}
break;
}
@@ -2518,10 +2518,10 @@ png_do_unshift(png_row_infop row_info, png_bytep row,
while (bp < bp_end)
{
int byte = *bp >> shift[channel];
int b = *bp >> shift[channel];
if (++channel >= channels)
channel = 0;
*bp++ = (png_byte)byte;
*bp++ = (png_byte)b;
}
break;
}