From 7411feae53453b8e0254d91ed25a6fb4f3d9bf98 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 26 May 2017 16:48:55 +0200 Subject: Add noreturn macro to all throw functions. --- source/fitz/error.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/fitz/error.c') diff --git a/source/fitz/error.c b/source/fitz/error.c index 9c52d204..6820034d 100644 --- a/source/fitz/error.c +++ b/source/fitz/error.c @@ -167,7 +167,7 @@ const char *fz_caught_message(fz_context *ctx) return ctx->error->message; } -void fz_vthrow(fz_context *ctx, int code, const char *fmt, va_list ap) +FZ_NORETURN void fz_vthrow(fz_context *ctx, int code, const char *fmt, va_list ap) { ctx->error->errcode = code; fz_vsnprintf(ctx->error->message, sizeof ctx->error->message, fmt, ap); @@ -187,7 +187,7 @@ void fz_vthrow(fz_context *ctx, int code, const char *fmt, va_list ap) throw(ctx); } -void fz_throw(fz_context *ctx, int code, const char *fmt, ...) +FZ_NORETURN void fz_throw(fz_context *ctx, int code, const char *fmt, ...) { va_list ap; va_start(ap, fmt); @@ -195,7 +195,7 @@ void fz_throw(fz_context *ctx, int code, const char *fmt, ...) va_end(ap); } -void fz_rethrow(fz_context *ctx) +FZ_NORETURN void fz_rethrow(fz_context *ctx) { assert(ctx && ctx->error && ctx->error->errcode >= FZ_ERROR_NONE); throw(ctx); -- cgit v1.2.3