From 7eb3cd0ceb1a003e4d4756112222f368644b8744 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Mon, 2 Jan 2023 11:48:52 -0800 Subject: [PATCH] Address alignment warnings for createcell68k() createcell68k(typecode) returns a pointer that is aligned for the typecode argument. Changing the return type to "void *" puts the onus on the caller to cast the result to an appropriately aligned object. All current uses in the maiko source ask for 4-byte objects (TYPE_FIXP, TYPE_FLOATP). --- inc/mkcelldefs.h | 2 +- src/mkcell.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/mkcelldefs.h b/inc/mkcelldefs.h index 7e1735f..285e5ef 100644 --- a/inc/mkcelldefs.h +++ b/inc/mkcelldefs.h @@ -2,5 +2,5 @@ #define MKCELLDEFS_H 1 #include "lispemul.h" /* for LispPTR, DLword */ LispPTR N_OP_createcell(LispPTR tos); -DLword *createcell68k(unsigned int type); +void *createcell68k(unsigned int type); #endif diff --git a/src/mkcell.c b/src/mkcell.c index fab09e0..f7d4896 100644 --- a/src/mkcell.c +++ b/src/mkcell.c @@ -90,7 +90,7 @@ retry: } /* N_OP_createcell end */ -DLword *createcell68k(unsigned int type) { +void *createcell68k(unsigned int type) { struct dtd *dtd68k; DLword *ptr, *lastptr; LispPTR newcell;