[libpng16] Removed one of the GCC-7.1.0 'strict-overflow' warnings that

result when integers appear on both sides of a compare.  Worked around the
  others by forcing the strict-overflow setting in the relevant functions to
  a level where they are not reported.
Changed "FALL THROUGH" comments to "FALLTHROUGH" because GCC doesn't like
  the space.
Worked around some C-style casts from (void*) because g++ 5.4.0 objects
  to them.
Increased the buffer size for 'sprint' to pass the gcc 7.1.0 'sprint
  overflow' check that is on by default with -Wall -Wextra.
This commit is contained in:
John Bowler
2017-07-11 07:50:35 -05:00
committed by Glenn Randers-Pehrson
parent ecea632c4c
commit 72d07d3202
13 changed files with 124 additions and 60 deletions

View File

@@ -40,7 +40,7 @@ static __m128i load3(const void* p) {
/* We'll load 2 bytes, then 1 byte,
* then mask them together, and finally load into SSE.
*/
const png_uint_16* p01 = p;
const png_uint_16* p01 = (png_const_uint_16p)p;
const png_byte* p2 = (const png_byte*)(p01+1);
png_uint_32 v012 = (png_uint_32)(*p01)
@@ -58,7 +58,7 @@ static void store3(void* p, __m128i v) {
store4(&v012, v);
p01 = p;
p01 = (png_uint_16p)p;
p2 = (png_byte*)(p01+1);
*p01 = (png_uint_16)v012;
*p2 = (png_byte)(v012 >> 16);