diff --git a/examples/pngdec.c b/examples/pngdec.c index 59e8b77d..332f6bbd 100644 --- a/examples/pngdec.c +++ b/examples/pngdec.c @@ -26,8 +26,8 @@ #include "webp/encode.h" #include "./metadata.h" -static void PNGAPI error_function(png_structp png, png_const_charp dummy) { - (void)dummy; // remove variable-unused warning +static void PNGAPI error_function(png_structp png, png_const_charp error) { + if (error != NULL) fprintf(stderr, "libpng error: %s\n", error); longjmp(png_jmpbuf(png), 1); }