Explorar o código

Disable unaligned reads in LZMA SDK; it upsets GCC's strict-aliasing rules.

Ryan C. Gordon %!s(int64=8) %!d(string=hai) anos
pai
achega
823061758b
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      src/physfs_lzmasdk.h

+ 4 - 4
src/physfs_lzmasdk.h

@@ -573,7 +573,7 @@ Stop_Compiling_Bad_Endian
 #ifdef MY_CPU_LE
 #ifdef MY_CPU_LE
   #if defined(MY_CPU_X86_OR_AMD64) \
   #if defined(MY_CPU_X86_OR_AMD64) \
       /* || defined(__AARCH64EL__) */
       /* || defined(__AARCH64EL__) */
-    #define MY_CPU_LE_UNALIGN
+    /*#define MY_CPU_LE_UNALIGN*/
   #endif
   #endif
 #endif
 #endif
 
 
@@ -584,9 +584,9 @@ Stop_Compiling_Bad_Endian
 #define GetUi32(p) (*(const UInt32 *)(const void *)(p))
 #define GetUi32(p) (*(const UInt32 *)(const void *)(p))
 #define GetUi64(p) (*(const UInt64 *)(const void *)(p))
 #define GetUi64(p) (*(const UInt64 *)(const void *)(p))
 
 
-#define SetUi16(p, v) { *(UInt16 *)((char *)(p)) = (v); }
-#define SetUi32(p, v) { *(UInt32 *)((char *)(p)) = (v); }
-#define SetUi64(p, v) { *(UInt64 *)((char *)(p)) = (v); }
+#define SetUi16(p, v) { *(UInt16 *)(p) = (v); }
+#define SetUi32(p, v) { *(UInt32 *)(p) = (v); }
+#define SetUi64(p, v) { *(UInt64 *)(p) = (v); }
 
 
 #else
 #else