From 009ffa3fc8a4fbb5f79bdc764910149d0ea24b27 Mon Sep 17 00:00:00 2001 From: Petri Lehtinen Date: Tue, 7 Nov 2017 10:20:09 +0200 Subject: Fix a compile error on macOS clang Reported by Diederick Huijbers --- src/jansson.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jansson.h b/src/jansson.h index af84940..ecf0e09 100644 --- a/src/jansson.h +++ b/src/jansson.h @@ -161,7 +161,7 @@ enum json_error_code { }; static JSON_INLINE enum json_error_code json_error_code(const json_error_t *e) { - return e->text[JSON_ERROR_TEXT_LENGTH - 1]; + return (enum json_error_code)e->text[JSON_ERROR_TEXT_LENGTH - 1]; } /* getters, setters, manipulation */ -- cgit v1.1