From 4127a7c2256da494326002994853d277ac82f96d Mon Sep 17 00:00:00 2001 From: Oldes Date: Tue, 21 Sep 2021 16:34:58 +0200 Subject: [PATCH] FIX: non-void function does not return a value --- src/core/u-compress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/u-compress.c b/src/core/u-compress.c index 36432e6a82..d69645f051 100644 --- a/src/core/u-compress.c +++ b/src/core/u-compress.c @@ -384,6 +384,7 @@ static REBYTE get_png_filter_type(REBVAL* val) { return MIN(PNG_FILTER_PAETH, MAX(0, VAL_INT32(val))); } Trap1(RE_INVALID_ARG, val); + return 0; // to make xcode happy } // See: https://www.rfc-editor.org/rfc/rfc2083.html#page-31 @@ -497,7 +498,7 @@ static REBYTE get_png_filter_type(REBVAL* val) { REBINT width = AS_INT32(val_width); REBCNT r, c, rows; REBYTE *scan, *prev, *temp, *out; - REBYTE filter; + REBYTE filter = 0; REBCNT bytes = VAL_LEN(val_data); REBCNT bpp = ref_skip ? VAL_INT32(val_bpp) : 1;