]> granicus.if.org Git - nethack/commitdiff
Follow-up to earlier warning correction with Microsoft compiler
authornhmall <nhmall@nethack.org>
Wed, 9 Jun 2021 01:51:55 +0000 (21:51 -0400)
committernhmall <nhmall@nethack.org>
Wed, 9 Jun 2021 01:51:55 +0000 (21:51 -0400)
The earlier warning is architecture-dependent.

The warning showed up under an x64 build, but not an x86 build.
The __unaligned keyword is not supported under an x86 build.

Refine the preprocessor conditional.

win/share/tile2bmp.c

index 434ab694f4e0ea057b0d2fff579e10349ec37a16..cfcc1c01ecdfffc1768067213c1d74e36eb27e92 100644 (file)
@@ -36,7 +36,7 @@ extern void objects_globals_init(void);
 # endif
 #endif
 
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && defined(_WIN64)
 #define UNALIGNED_POINTER __unaligned
 #else
 #define UNALIGNED_POINTER