summaryrefslogtreecommitdiffstats
path: root/ffi.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-05-11 08:05:30 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-05-11 08:05:30 -0700
commit72485dabcf57c73bcedf1acfc6a086f6228591c3 (patch)
treeb461b877dbb03233f3d9ab304f3932bff937a739 /ffi.c
parent643ba825b18caed84e08137ee92417a9f71b9024 (diff)
downloadtxr-72485dabcf57c73bcedf1acfc6a086f6228591c3.tar.gz
txr-72485dabcf57c73bcedf1acfc6a086f6228591c3.tar.bz2
txr-72485dabcf57c73bcedf1acfc6a086f6228591c3.zip
ffi: fix unused variable warning.
* ffi.c (ffi_varray_null_term_get): An i variable is initialized and incremented in a for loop, but never used.
Diffstat (limited to 'ffi.c')
-rw-r--r--ffi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ffi.c b/ffi.c
index 91704da7..dae972b1 100644
--- a/ffi.c
+++ b/ffi.c
@@ -3316,9 +3316,9 @@ static val ffi_varray_null_term_get(struct txr_ffi_type *tft, mem_t *src,
val vec = vector(zero, nil);
struct txr_ffi_type *etft = ffi_type_struct(eltype);
cnum elsize = etft->size;
- cnum offs, i;
+ cnum offs = 0;
- for (i = 0, offs = 0; ; i++) {
+ for (;;) {
mem_t *el = src + offs, *p;
for (p = el; p < el + elsize; p++)