summaryrefslogtreecommitdiff
path: root/pngread.c
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@acm.org>2015-08-16 22:54:21 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2015-08-16 22:54:21 -0500
commit751cee5ef13ffa275072272b44cc3eac2963904b (patch)
tree11cc5be79f0fd67c594307fcf29a18e854c1babf /pngread.c
parent8ba4b13c550cfaa93360d0d115a2687a43f37cd6 (diff)
downloadlibpng-751cee5ef13ffa275072272b44cc3eac2963904b.tar.gz
[libpng16] Added signed/unsigned 16-bit safety net. This removes the dubious
0x8000 flag definitions on 16-bit systems. They aren't supported yet the defs *probably* work, however it seems much safer to do this and be advised if anyone, contrary to advice, is building libpng 1.6 on a 16-bit system. It also adds back various switch default clauses for GCC; GCC errors out if they are not present (with an appropriately high level of warnings).
Diffstat (limited to 'pngread.c')
-rw-r--r--pngread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pngread.c b/pngread.c
index 22054e1c9..1366140e7 100644
--- a/pngread.c
+++ b/pngread.c
@@ -1683,7 +1683,7 @@ decode_gamma(png_image_read_control *display, png_uint_32 value, int encoding)
value *= 257;
break;
-#ifdef PNG_DEBUG
+#ifdef __GNUC__
default:
png_error(display->image->opaque->png_ptr,
"unexpected encoding (internal error)");
@@ -2858,7 +2858,7 @@ png_image_read_colormap(png_voidp argument)
png_set_scale_16(png_ptr);
break;
-#ifdef PNG_DEBUG
+#ifdef __GNUC__
default:
png_error(png_ptr, "bad data option (internal error)");
#endif
@@ -3630,7 +3630,7 @@ png_image_read_background(png_voidp argument)
}
break;
-#ifdef PNG_DEBUG
+#ifdef __GNUC__
default:
png_error(png_ptr, "unexpected bit depth");
#endif