From fff86c8050d5b467973f8929f5de8eab5e32c690 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Fri, 13 Jan 2023 16:39:06 -0800 Subject: [PATCH] Resolve warning: implicit conversion changes signedness: 'unsigned int' to 'int' by making the conversion explicit. The signedness conversion is necessary and expected. --- src/arithops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arithops.c b/src/arithops.c index 9bee65e..90faa30 100644 --- a/src/arithops.c +++ b/src/arithops.c @@ -313,7 +313,7 @@ LispPTR N_OP_makenumber(LispPTR tosm1, LispPTR tos) { if (((tosm1 & 0xFFFF0000) != S_POSITIVE) || ((tos & 0xFFFF0000) != S_POSITIVE)) ERROR_EXIT(tos); /* UB: left shift of 49152 by 16 places cannot be represented in type 'int' */ - result = ((tosm1 & 0xffff) << 16) | (tos & 0xffff); + result = (int)(((tosm1 & 0xffff) << 16) | (tos & 0xffff)); N_ARITH_SWITCH(result); } /* end OP_makenumber */