Skip to content

Commit

Permalink
Workaround strict-aliasing warnings on some versions of GCC.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 17, 2017
1 parent 3765efb commit f6c8309
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/physfs_lzmasdk.h
Expand Up @@ -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

Expand Down

0 comments on commit f6c8309

Please sign in to comment.