From 7ed9432eed94beef4f35f16df2c0bd53dd2ce4bc Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 7 Dec 2016 06:18:30 -0800 Subject: Fix some C style casts to use casting macros. This is uncovered by compiling with g++ using -Wold-style-cast. * mpi/mpi.c (mp_get_intptr): Use convert macro. Also in one of the rules producing REGCHAR. * parser.l (num_esc): Likewise. * struct.c (static_slot_set, static_slot_ens_rec, get_equal_method): Use coerce macro for int to pointer conversion. * sysif.c (setgroups_wrap): Use convert macro. * termios.c (termios_unpack, termios_pack): Likewise. * txr.c (sysroot_init): Likewise. --- sysif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysif.c') diff --git a/sysif.c b/sysif.c index 2c68b6d9..2cb9d378 100644 --- a/sysif.c +++ b/sysif.c @@ -1048,7 +1048,7 @@ static val setgroups_wrap(val list) cnum len = c_num(length(list)); size_t size = len; - if ((cnum) size != len) { + if (convert(cnum, size) != len) { uw_throwf(system_error_s, lit("setgroups: list too long"), nao); } else { gid_t *arr = coerce(gid_t *, chk_malloc(size *sizeof *arr)); -- cgit v1.2.3