diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-08-19 10:14:15 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-08-19 10:14:15 +0000 |
commit | 19f3e16405b466ae87fe10d3942503e42a3e73a6 (patch) | |
tree | 15af6fe5bb9c5c6e3172c1a8062aad5b6de13160 /Build | |
parent | e12b5b9853d6132418dab183c932258a3fd23e6a (diff) |
texk/dvipdfm-x: Avoid PNG warnings
git-svn-id: svn://tug.org/texlive/trunk@34980 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/pngimage.c | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index 27a4ba55300..f28522d58d2 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,7 @@ +2014-08-19 Peter Breitenlohner <peb@mppmu.mpg.de> + + * pngimage.c: Avoid PNG warnings. + 2014-08-16 Peter Breitenlohner <peb@mppmu.mpg.de> * dvi.c: Drop unused variable. Use "%lu" for unsigned long vars. diff --git a/Build/source/texk/dvipdfm-x/pngimage.c b/Build/source/texk/dvipdfm-x/pngimage.c index ec902dbcf59..0d193e050f5 100644 --- a/Build/source/texk/dvipdfm-x/pngimage.c +++ b/Build/source/texk/dvipdfm-x/pngimage.c @@ -152,6 +152,11 @@ check_for_png (FILE *png_file) return 1; } +static void warn(png_structp png_ptr, png_const_charp msg) +{ + (void)png_ptr; (void)msg; /* Make compiler happy */ +} + int png_include_image (pdf_ximage *ximage, FILE *png_file) { @@ -174,7 +179,7 @@ png_include_image (pdf_ximage *ximage, FILE *png_file) colorspace = mask = intent = NULL; 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) { WARN("%s: Creating Libpng read/info struct failed.", PNG_DEBUG_STR); @@ -1030,7 +1035,7 @@ png_get_bbox (FILE *png_file, long *width, long *height, png_infop png_info_ptr; 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) { WARN("%s: Creating Libpng read/info struct failed.", PNG_DEBUG_STR); |