diff --git a/wrlib/load_jpeg.c b/wrlib/load_jpeg.c index 815181bc..178d5d9b 100644 --- a/wrlib/load_jpeg.c +++ b/wrlib/load_jpeg.c @@ -31,6 +31,10 @@ #include +#ifdef HAVE_STDNORETURN +#include +#endif + #include "wraster.h" #include "imgformat.h" @@ -76,7 +80,7 @@ typedef struct my_error_mgr *my_error_ptr; * Here's the routine that will replace the standard error_exit method: */ -static void my_error_exit(j_common_ptr cinfo) +static noreturn void my_error_exit(j_common_ptr cinfo) { /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ my_error_ptr myerr = (my_error_ptr) cinfo->err;