summaryrefslogtreecommitdiffstats
path: root/ffi.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-02-28 08:52:40 -0800
committerKaz Kylheku <kaz@kylheku.com>2023-02-28 08:52:40 -0800
commit4612a97e04f78cba5670b206bb178cd1f1dd447f (patch)
treebd5655205752438874a88c5ff2768c0dc279d57b /ffi.c
parent3ade8d5cc4514df520edd4f95817b445e35fff41 (diff)
downloadtxr-4612a97e04f78cba5670b206bb178cd1f1dd447f.tar.gz
txr-4612a97e04f78cba5670b206bb178cd1f1dd447f.tar.bz2
txr-4612a97e04f78cba5670b206bb178cd1f1dd447f.zip
ffi: c++: several C-style casts have snuck in
* ffi.c (make_ffi_type_struct, make_ffi_type_union, ffi_type_compile): Use convert macro instead of C cast notation.
Diffstat (limited to 'ffi.c')
-rw-r--r--ffi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ffi.c b/ffi.c
index 25d500dd..e97eadb5 100644
--- a/ffi.c
+++ b/ffi.c
@@ -3874,7 +3874,7 @@ static val make_ffi_type_struct(val syntax, val lisp_type,
if (slot) {
if (align > most_align)
most_align = align;
- if ((ucnum) mtft->oalign > most_align)
+ if (convert(ucnum, mtft->oalign) > most_align)
most_align = mtft->oalign;
}
} else {
@@ -4013,7 +4013,7 @@ static val make_ffi_type_union(val syntax, val use_existing, val self)
mtft->shift = bits_int - bits;
#if HAVE_I64
- if (mtft->size > (int) sizeof (int)) {
+ if (mtft->size > convert(int, sizeof (int))) {
if (bits == bits_llint)
mtft->m.fmask = convert(u64_t, -1);
else
@@ -4564,7 +4564,7 @@ val ffi_type_compile(val syntax)
(tft_cp->bigendian && !HAVE_LITTLE_ENDIAN))
{
#if HAVE_I64
- if (tft->size > (int) sizeof (int)) {
+ if (tft->size > convert(int, sizeof (int))) {
tft_cp->put = if3(unsgnd,
ffi_generic_fat_ubit_put,
ffi_generic_fat_sbit_put);
@@ -4579,7 +4579,7 @@ val ffi_type_compile(val syntax)
}
} else {
#if HAVE_I64
- if (tft->size > (int) sizeof (int)) {
+ if (tft->size > convert(int, sizeof (int))) {
tft_cp->put = if3(unsgnd,
ffi_generic_swap_fat_ubit_put,
ffi_generic_swap_fat_sbit_put);