summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/xetexdir
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/xetexdir
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/xetexdir')
-rw-r--r--Build/source/texk/web2c/xetexdir/image/pngimage.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/xetexdir/image/pngimage.c b/Build/source/texk/web2c/xetexdir/image/pngimage.c
index 27e74fbbfc3..ec677528130 100644
--- a/Build/source/texk/web2c/xetexdir/image/pngimage.c
+++ b/Build/source/texk/web2c/xetexdir/image/pngimage.c
@@ -94,6 +94,11 @@
#define PDF_TRANS_TYPE_BINARY 1
#define PDF_TRANS_TYPE_ALPHA 2
+static void warn(png_structp png_ptr, png_const_charp msg)
+{
+ (void)png_ptr; (void)msg; /* Make compiler happy */
+}
+
int
check_for_png (FILE *png_file)
{
@@ -118,7 +123,7 @@ png_scan_file (struct png_info *info, FILE *png_file)
png_uint_32 width, height;
rewind (png_file);
- png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, warn);
if (png_ptr == NULL ||
(png_info_ptr = png_create_info_struct (png_ptr)) == NULL) {
fprintf(stderr, "WARNING: %s: Creating Libpng read/info struct failed.", PNG_DEBUG_STR);