summaryrefslogtreecommitdiffstats
path: root/ffi.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-12-16 13:09:31 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-12-16 13:09:31 -0800
commitb30f8596fd90fd87283980410838ceaa86b4e148 (patch)
treec7d3cb848fea8f3e61e48565fafec85e5e50988d /ffi.c
parent3107a205c00d0038bf6969d760901dcaddb25355 (diff)
downloadtxr-b30f8596fd90fd87283980410838ceaa86b4e148.tar.gz
txr-b30f8596fd90fd87283980410838ceaa86b4e148.tar.bz2
txr-b30f8596fd90fd87283980410838ceaa86b4e148.zip
ffi: shut up gcc7 warnings about switch case.
* ffi.c (ffi_array_put, ffi_array_out): Handle conv_none in the switch, even though the whole switch is conditional on the value being other than conv_none.
Diffstat (limited to 'ffi.c')
-rw-r--r--ffi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ffi.c b/ffi.c
index 21e9024d..a7ccfe28 100644
--- a/ffi.c
+++ b/ffi.c
@@ -2432,6 +2432,9 @@ static void ffi_array_put(struct txr_ffi_type *tft, val vec, mem_t *dst,
case conv_bchar:
ffi_bchar_array_put(tft, vec, dst, tft->nelem, self);
break;
+ case conv_none:
+ /* notreached */
+ break;
}
} else {
ffi_array_put_common(tft, vec, dst, self, tft->nelem);
@@ -2477,6 +2480,10 @@ static void ffi_array_out(struct txr_ffi_type *tft, int copy, val vec,
break;
case conv_bchar:
ffi_bchar_array_put(tft, vec, dst, tft->nelem, self);
+ break;
+ case conv_none:
+ /* notreached */
+ break;
}
} else {
ffi_array_out_common(tft, copy, vec, dst, self, tft->nelem);