summaryrefslogtreecommitdiffstats
path: root/ffi.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-02-08 22:59:10 -0800
committerKaz Kylheku <kaz@kylheku.com>2020-02-08 22:59:10 -0800
commit86f914e7aa7214d049356d17bd8ad85a28eb32ce (patch)
tree7baf601aad9c68dc8c1a40bc2f12b6066d1504ef /ffi.c
parentd201dc097fa6920b37c16dd83ca7e52575223d2f (diff)
downloadtxr-86f914e7aa7214d049356d17bd8ad85a28eb32ce.tar.gz
txr-86f914e7aa7214d049356d17bd8ad85a28eb32ce.tar.bz2
txr-86f914e7aa7214d049356d17bd8ad85a28eb32ce.zip
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.
Diffstat (limited to 'ffi.c')
-rw-r--r--ffi.c2
1 files changed, 1 insertions, 1 deletions
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);
}