From 86f914e7aa7214d049356d17bd8ad85a28eb32ce Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 8 Feb 2020 22:59:10 -0800 Subject: ffi: varray: g++ signed/unsigned warning. * ffi.c (ffi_varray_alloc): Add cast to this conversion. The idea here is we are checking for truncation when cnum is converted to size_t. --- ffi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffi.c b/ffi.c index ae479e98..5b59e281 100644 --- a/ffi.c +++ b/ffi.c @@ -436,7 +436,7 @@ static mem_t *ffi_varray_alloc(struct txr_ffi_type *tft, val obj, val self) { cnum dynsize = ffi_varray_dynsize(tft, obj, self); size_t size = dynsize; - if (size != dynsize) + if ((cnum) size != dynsize) uw_throwf(error_s, lit("~a: array too large"), self, nao); return chk_calloc(size, 1); } -- cgit v1.2.3