mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-19 09:18:33 +00:00
Use (void *) casts in adr68k.h functions, after ensuring correct pointer alignment, to eliminate spurious alignment warnings.
This commit is contained in:
parent
679b201849
commit
b85e7cac80
@ -51,12 +51,12 @@ static inline LispPTR *NativeAligned4FromLAddr(LispPTR LAddr)
|
||||
if (LAddr & 1) {
|
||||
printf("Misaligned pointer in NativeAligned4FromLAddr 0x%x\n", LAddr);
|
||||
}
|
||||
return (LispPTR *)(Lisp_world + LAddr);
|
||||
return (void *)(Lisp_world + LAddr);
|
||||
}
|
||||
|
||||
static inline LispPTR *NativeAligned4FromLPage(LispPTR LPage)
|
||||
{
|
||||
return (LispPTR *)(Lisp_world + (LPage << 8));
|
||||
return (void *)(Lisp_world + (LPage << 8));
|
||||
}
|
||||
|
||||
static inline DLword StackOffsetFromNative(void *SAddr)
|
||||
@ -76,7 +76,10 @@ static inline DLword *NativeAligned2FromStackOffset(DLword StackOffset)
|
||||
|
||||
static inline LispPTR *NativeAligned4FromStackOffset(DLword StackOffset)
|
||||
{
|
||||
return (LispPTR *)(Stackspace + StackOffset);
|
||||
if (StackOffset & 1) {
|
||||
printf("Misaligned StackOffset in NativeAligned4FromStackOffset 0x%tx\n", StackOffset);
|
||||
}
|
||||
return (void *)(Stackspace + StackOffset);
|
||||
}
|
||||
|
||||
static inline LispPTR LPageFromNative(void *NAddr)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user