summaryrefslogtreecommitdiff
path: root/pngset.c
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@acm.org>2016-06-28 19:18:09 -0700
committerJohn Bowler <jbowler@acm.org>2016-07-01 11:27:43 -0700
commit0ac91cc657ff18f48675183f09fc4a2102fe8dd4 (patch)
tree33881186c0df263af6298c55d622e78d99a54302 /pngset.c
parentd9779744f9e1e7211933e12701a05c80c93c9de2 (diff)
pngcp: tool to copy PNG files
This adds pngcp to the build together with a pngcp.dfa configuration test; the test revealed some configuration bugs which are fixed by corrections to the _SUPPORTED macros. pngcp builds on all tested configurations and a number of bugs have been fixed to make this happen relative to the version in libpng 1.7 contrib/examples. pngcp.dfa will have to be different for 1.7 but pngcp.c should work fine (not yet tested). pngcp itself is still missing a usage message; this is a preliminary version, although since it behaves the same way as 'cp' most unoids shouldn't have a problem using it correctly. Signed-off-by: John Bowler <jbowler@acm.org>
Diffstat (limited to 'pngset.c')
-rw-r--r--pngset.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pngset.c b/pngset.c
index 43456b729..5ffb28364 100644
--- a/pngset.c
+++ b/pngset.c
@@ -1662,7 +1662,9 @@ png_set_check_for_invalid_index(png_structrp png_ptr, int allowed)
png_uint_32 /* PRIVATE */
png_check_keyword(png_structrp png_ptr, png_const_charp key, png_bytep new_key)
{
+#ifdef PNG_WARNINGS_SUPPORTED
png_const_charp orig_key = key;
+#endif
png_uint_32 key_len = 0;
int bad_character = 0;
int space = 1;
@@ -1725,7 +1727,9 @@ png_check_keyword(png_structrp png_ptr, png_const_charp key, png_bytep new_key)
png_formatted_warning(png_ptr, p, "keyword \"@1\": bad character '0x@2'");
}
-#endif /* WARNINGS */
+#else /* !WARNINGS */
+ PNG_UNUSED(png_ptr)
+#endif /* !WARNINGS */
return key_len;
}