summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/image
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-08-19 10:06:19 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-08-19 10:06:19 +0000
commit092fdbe5bdea0ae250210a394363a4f618b27eea (patch)
tree625e62a2a938d75aa17f7f6204bb588c36371802 /Build/source/texk/web2c/luatexdir/image
parent495f660b981136a457e736a2e6cff8eda4a55e16 (diff)
LuaTeX, pdfTeX, XeTeX: Avoid PNG warnings
git-svn-id: svn://tug.org/texlive/trunk@34978 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/image')
-rw-r--r--Build/source/texk/web2c/luatexdir/image/writepng.w7
1 files changed, 6 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/luatexdir/image/writepng.w b/Build/source/texk/web2c/luatexdir/image/writepng.w
index 5e2f34e1570..50eec4636f2 100644
--- a/Build/source/texk/web2c/luatexdir/image/writepng.w
+++ b/Build/source/texk/web2c/luatexdir/image/writepng.w
@@ -45,6 +45,11 @@ static void close_and_cleanup_png(image_dict * idict)
}
@ @c
+static void warn(png_structp png_ptr, png_const_charp msg)
+{
+ (void)png_ptr; (void)msg; /* Make compiler happy */
+}
+
void read_png_info(image_dict * idict, img_readtype_e readtype)
{
png_structp png_p;
@@ -59,7 +64,7 @@ void read_png_info(image_dict * idict, img_readtype_e readtype)
assert(img_png_ptr(idict) == NULL);
img_png_ptr(idict) = xtalloc(1, png_img_struct);
if ((png_p = png_create_read_struct(PNG_LIBPNG_VER_STRING,
- NULL, NULL, NULL)) == NULL)
+ NULL, NULL, warn)) == NULL)
luatex_fail("libpng: png_create_read_struct() failed");
img_png_png_ptr(idict) = png_p;
if ((info_p = png_create_info_struct(png_p)) == NULL)