[libpng16] Removed need for -Wno-cast-align with clang. clang correctly warns

on alignment increasing pointer casts when -Wcast-align is passed. This
fixes the cases clang warns about either (pngread.c) by eliminating the
casts from png_bytep to png_uint_16p or, for pngrutil.c where the cast
is previously verified or pngstest.c where it is OK by introducing new
png_aligncast macros to do the cast in a way that clang accepts.
This commit is contained in:
John Bowler
2012-04-30 06:31:54 -05:00
committed by Glenn Randers-Pehrson
parent 040575c80b
commit b45416921b
8 changed files with 80 additions and 44 deletions

4
png.c
View File

@@ -747,13 +747,13 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.6.0beta22 - April 28, 2012" PNG_STRING_NEWLINE \
"libpng version 1.6.0beta22 - April 30, 2012" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2012 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
return "libpng version 1.6.0beta22 - April 28, 2012\
return "libpng version 1.6.0beta22 - April 30, 2012\
Copyright (c) 1998-2012 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";