Mike Frysinger  committed 0cf194b

fix jpeg emit callback prototype

Building with libjpeg-turbo-1.2.1 yields this warning:

gd_jpeg.c: In function 'gdImageCreateFromJpegCtxEx':
gd_jpeg.c:373:26: warning: assignment from incompatible pointer type [enabled by default]
cinfo.err->emit_message = jpeg_emit_message;

Looking at older jpeg releases (v6 & v8), it seems that this func has
always expected to have a "void" return value, not "long".

  • Participants
  • Parent commits ac33a3a
  • Branches master

Comments (0)

Files changed (1)

File src/gd_jpeg.c

-static long jpeg_emit_message(j_common_ptr jpeg_info, int level)
+static void jpeg_emit_message(j_common_ptr jpeg_info, int level)
 	char message[JMSG_LENGTH_MAX];
 	jmpbuf_wrapper *jmpbufw;
-	return 1;
 /* Called by the IJG JPEG library upon encountering a fatal error */