summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFabian Greffrath2015-05-04 07:55:15 +0200
committerFabian Greffrath2015-05-04 07:55:15 +0200
commit6812a5896abf0f78fa45ed14d4b4a7e6f2f4d310 (patch)
tree31f2899f35797fa700f80b82b994b919035c1029 /src
parent63df9283035b7f221dcef0cd5d1e488da3af12b6 (diff)
downloadchocolate-doom-6812a5896abf0f78fa45ed14d4b4a7e6f2f4d310.tar.gz
chocolate-doom-6812a5896abf0f78fa45ed14d4b4a7e6f2f4d310.tar.bz2
chocolate-doom-6812a5896abf0f78fa45ed14d4b4a7e6f2f4d310.zip
warnings: fix some cast to/from pointer from/to int warnings
This fixes the following two warnings cast from pointer to integer of different size cast to pointer from integer of different size by either changing some ints that are supposed to hold pointers to intptr_t type or by intermediate casting to (intptr_t).
Diffstat (limited to 'src')
-rw-r--r--src/doom/p_maputl.c2
-rw-r--r--src/doom/p_saveg.c4
-rw-r--r--src/setup/multiplayer.c8
-rw-r--r--src/strife/p_saveg.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/src/doom/p_maputl.c b/src/doom/p_maputl.c
index 098c2c73..6cc35a5a 100644
--- a/src/doom/p_maputl.c
+++ b/src/doom/p_maputl.c
@@ -846,7 +846,7 @@ static void InterceptsOverrun(int num_intercepts, intercept_t *intercept)
InterceptsMemoryOverrun(location, intercept->frac);
InterceptsMemoryOverrun(location + 4, intercept->isaline);
- InterceptsMemoryOverrun(location + 8, (int) intercept->d.thing);
+ InterceptsMemoryOverrun(location + 8, (intptr_t) intercept->d.thing);
}
diff --git a/src/doom/p_saveg.c b/src/doom/p_saveg.c
index 6a48271d..5cb81967 100644
--- a/src/doom/p_saveg.c
+++ b/src/doom/p_saveg.c
@@ -184,12 +184,12 @@ static void saveg_write_pad(void)
static void *saveg_readp(void)
{
- return (void *) saveg_read32();
+ return (void *) (intptr_t) saveg_read32();
}
static void saveg_writep(void *p)
{
- saveg_write32((int) p);
+ saveg_write32((intptr_t) p);
}
// Enum values are 32-bit integers.
diff --git a/src/setup/multiplayer.c b/src/setup/multiplayer.c
index 53b8ba26..4aaff921 100644
--- a/src/setup/multiplayer.c
+++ b/src/setup/multiplayer.c
@@ -355,7 +355,7 @@ static void SetExMyWarp(TXT_UNCAST_ARG(widget), void *val)
{
int l;
- l = (int) val;
+ l = (intptr_t) val;
warpepisode = l / 10;
warpmap = l % 10;
@@ -367,7 +367,7 @@ static void SetMAPxyWarp(TXT_UNCAST_ARG(widget), void *val)
{
int l;
- l = (int) val;
+ l = (intptr_t) val;
warpmap = l;
@@ -389,8 +389,8 @@ static void LevelSelectDialog(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(user_data))
const iwad_t *iwad;
char buf[10];
int episodes;
- int x, y;
- int l;
+ intptr_t x, y;
+ intptr_t l;
int i;
window = TXT_NewWindow("Select level");
diff --git a/src/strife/p_saveg.c b/src/strife/p_saveg.c
index 9fec0c02..ffe9dbcb 100644
--- a/src/strife/p_saveg.c
+++ b/src/strife/p_saveg.c
@@ -186,12 +186,12 @@ static void saveg_write_pad(void)
static void *saveg_readp(void)
{
- return (void *) saveg_read32();
+ return (void *) (intptr_t) saveg_read32();
}
static void saveg_writep(void *p)
{
- saveg_write32((int) p);
+ saveg_write32((intptr_t) p);
}
// Enum values are 32-bit integers.