Mike Frysinger avatar 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".

Comments (0)

Files changed (1)

-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 */
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.