aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-08-19 12:05:17 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-08-19 12:05:17 +0000
commitea74788828dfaf5232ff85d324b985c089b6da4c (patch)
tree98122da7893f0ab0036b4b4daaf341a7d68d3065 /code
parentbdb8ffe61b8baa8547755d1b27e43a9feb3868b9 (diff)
downloadioquake3-aero-ea74788828dfaf5232ff85d324b985c089b6da4c.tar.gz
ioquake3-aero-ea74788828dfaf5232ff85d324b985c089b6da4c.zip
fix gcc 4.2 warnings about cast from pointer to integer (#3317)
git-svn-id: svn://svn.icculus.org/quake3/trunk@1125 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r--code/botlib/be_ai_goal.c2
-rw-r--r--code/botlib/be_ai_weap.c4
-rw-r--r--code/game/g_local.h2
-rw-r--r--code/qcommon/msg.c4
-rw-r--r--code/renderer/tr_init.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/code/botlib/be_ai_goal.c b/code/botlib/be_ai_goal.c
index e240c44..3706519 100644
--- a/code/botlib/be_ai_goal.c
+++ b/code/botlib/be_ai_goal.c
@@ -134,7 +134,7 @@ typedef struct iteminfo_s
int number; //number of the item info
} iteminfo_t;
-#define ITEMINFO_OFS(x) (int)&(((iteminfo_t *)0)->x)
+#define ITEMINFO_OFS(x) (size_t)&(((iteminfo_t *)0)->x)
fielddef_t iteminfo_fields[] =
{
diff --git a/code/botlib/be_ai_weap.c b/code/botlib/be_ai_weap.c
index 56aabcc..50b0dea 100644
--- a/code/botlib/be_ai_weap.c
+++ b/code/botlib/be_ai_weap.c
@@ -48,8 +48,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//#define DEBUG_AI_WEAP
//structure field offsets
-#define WEAPON_OFS(x) (int)&(((weaponinfo_t *)0)->x)
-#define PROJECTILE_OFS(x) (int)&(((projectileinfo_t *)0)->x)
+#define WEAPON_OFS(x) (size_t)&(((weaponinfo_t *)0)->x)
+#define PROJECTILE_OFS(x) (size_t)&(((projectileinfo_t *)0)->x)
//weapon definition // bk001212 - static
static fielddef_t weaponinfo_fields[] =
diff --git a/code/game/g_local.h b/code/game/g_local.h
index 74c55e6..2efc4c1 100644
--- a/code/game/g_local.h
+++ b/code/game/g_local.h
@@ -712,7 +712,7 @@ void BotTestAAS(vec3_t origin);
extern level_locals_t level;
extern gentity_t g_entities[MAX_GENTITIES];
-#define FOFS(x) ((int)&(((gentity_t *)0)->x))
+#define FOFS(x) ((size_t)&(((gentity_t *)0)->x))
extern vmCvar_t g_gametype;
extern vmCvar_t g_dedicated;
diff --git a/code/qcommon/msg.c b/code/qcommon/msg.c
index e743597..b26cf8f 100644
--- a/code/qcommon/msg.c
+++ b/code/qcommon/msg.c
@@ -790,7 +790,7 @@ typedef struct {
} netField_t;
// using the stringizing operator to save typing...
-#define NETF(x) #x,(int)&((entityState_t*)0)->x
+#define NETF(x) #x,(size_t)&((entityState_t*)0)->x
netField_t entityStateFields[] =
{
@@ -1105,7 +1105,7 @@ plyer_state_t communication
*/
// using the stringizing operator to save typing...
-#define PSF(x) #x,(int)&((playerState_t*)0)->x
+#define PSF(x) #x,(size_t)&((playerState_t*)0)->x
netField_t playerStateFields[] =
{
diff --git a/code/renderer/tr_init.c b/code/renderer/tr_init.c
index e67e7e4..0434d2a 100644
--- a/code/renderer/tr_init.c
+++ b/code/renderer/tr_init.c
@@ -1084,7 +1084,7 @@ void R_Init( void ) {
// Swap_Init();
- if ( (int)tess.xyz & 15 ) {
+ if ( (intptr_t)tess.xyz & 15 ) {
Com_Printf( "WARNING: tess.xyz not 16 byte aligned\n" );
}
Com_Memset( tess.constantColor255, 255, sizeof( tess.constantColor255 ) );