From 96b3bddf12e75b00f41c71bfe01e7d09c3d48354 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Sat, 14 Jan 2023 12:02:03 -0800 Subject: [PATCH] Resolve warning: arithmetic on a pointer to void is a GNU extension GCC treats the size of a void as 1 for the purposes of arithmetic on a pointer to void. Since this was provoked by an explicit cast to pointer to void we can replace it with a cast to pointer to char for the same effect. --- inc/tosfns.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/tosfns.h b/inc/tosfns.h index 62105c6..90e2f10 100644 --- a/inc/tosfns.h +++ b/inc/tosfns.h @@ -366,7 +366,7 @@ } \ LOCFNCELL = (struct fnhead *)NativeAligned4FromLAddr(defcell->defpointer); \ BCE_CURRENTFX->pc = ((UNSIGNED)PCMAC - (UNSIGNED)FuncObj) + fn_opcode_size; \ - FNTPRINT(("Saving PC = 0%o (%p).\n", BCE_CURRENTFX->pc, (void *)PCMAC + fn_opcode_size)); \ + FNTPRINT(("Saving PC = 0%o (%p).\n", BCE_CURRENTFX->pc, (char *)PCMAC + fn_opcode_size)); \ FN_STACK_CHECK; \ APPLY_POP_PUSH_TEST; \ { \