From c0e1e6a711cd6d819af9d0ce237d04cfd583d50b Mon Sep 17 00:00:00 2001 From: Douglas Katzman Date: Thu, 14 May 2020 12:44:54 -0400 Subject: [PATCH] Fix "cast from pointer to integer of different size" warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The way I saw this was that a non-unicode SBCL got a character decoding error in RUN-PROGRAM on the C compiler whose output contained stack-alignment-offset.c: In function ‘stack_alignment_offset’: where the quote mark is (CODE-CHAR #x2018) = #\LEFT_SINGLE_QUOTATION_MARK. The SBCL error was only visible in the parallel test executor which seems to run with LANG=en_US.UTF-8 instead of LANG=C. I don't know why the discrepancy. But, hey, it was a good reason to get a locale setting wrong! --- tests/stack-alignment-offset.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/stack-alignment-offset.c b/tests/stack-alignment-offset.c index 91e5f491a..030ca63b9 100644 --- a/tests/stack-alignment-offset.c +++ b/tests/stack-alignment-offset.c @@ -22,7 +22,8 @@ */ #include -#include +#include // for uintptr_t +#include // for atoi /* bwahahahaaa! * oh dear. He's finally flipped @@ -35,7 +36,7 @@ extern int stack_alignment_offset (int alignment) { - return ((unsigned int)&alignment) % alignment; + return ((unsigned int)(uintptr_t)&alignment) % alignment; } extern int