shithub: choc

Download patch

ref: ce318ac2182e6ef78b642dbbdd55e9ed2c16837f
parent: 9a8f5dc9d9e9ec83e49b53daf208ea39b01fdab4
parent: 0ef2ddcb0ad6a3ee61d5a26fafc846ba8cf5e99b
author: Fabian Greffrath <[email protected]>
date: Sun May 6 09:27:16 EDT 2018

Merge pull request #1034 from JNechaevsky/intptr_t-x64

fix two compiler warnings on x64 build

--- a/src/heretic/p_saveg.c
+++ b/src/heretic/p_saveg.c
@@ -123,7 +123,7 @@
 
 void SV_WritePtr(void *ptr)
 {
-    long val = (long) ptr;
+    long val = (long)(intptr_t) ptr;
 
     SV_WriteLong(val & 0xffffffff);
 }
--- a/src/hexen/sv_save.c
+++ b/src/hexen/sv_save.c
@@ -3452,6 +3452,6 @@
     // nowadays they might be larger. Whatever value we write here isn't
     // going to be much use when we reload the game.
 
-    ptr = (long) val;
+    ptr = (long)(intptr_t) val;
     SV_WriteLong((unsigned int) (ptr & 0xffffffff));
 }