diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-02-08 22:59:10 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-02-08 22:59:10 -0800 |
commit | 86f914e7aa7214d049356d17bd8ad85a28eb32ce (patch) | |
tree | 7baf601aad9c68dc8c1a40bc2f12b6066d1504ef /ffi.c | |
parent | d201dc097fa6920b37c16dd83ca7e52575223d2f (diff) | |
download | txr-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |