From f6c830968c5be484589438649781e19ddb20028c Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 17 Jul 2017 14:46:36 -0400 Subject: [PATCH] Workaround strict-aliasing warnings on some versions of GCC. --- src/physfs_lzmasdk.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/physfs_lzmasdk.h b/src/physfs_lzmasdk.h index 5933cb3..3a79b5b 100644 --- a/src/physfs_lzmasdk.h +++ b/src/physfs_lzmasdk.h @@ -584,9 +584,9 @@ Stop_Compiling_Bad_Endian #define GetUi32(p) (*(const UInt32 *)(const void *)(p)) #define GetUi64(p) (*(const UInt64 *)(const void *)(p)) -#define SetUi16(p, v) { *(UInt16 *)(p) = (v); } -#define SetUi32(p, v) { *(UInt32 *)(p) = (v); } -#define SetUi64(p, v) { *(UInt64 *)(p) = (v); } +#define SetUi16(p, v) { *(UInt16 *)((char *)(p)) = (v); } +#define SetUi32(p, v) { *(UInt32 *)((char *)(p)) = (v); } +#define SetUi64(p, v) { *(UInt64 *)((char *)(p)) = (v); } #else