r1125 - in trunk/code: botlib game qcommon renderer
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Aug 19 08:05:17 EDT 2007
Author: ludwig
Date: 2007-08-19 08:05:17 -0400 (Sun, 19 Aug 2007)
New Revision: 1125
Modified:
trunk/code/botlib/be_ai_goal.c
trunk/code/botlib/be_ai_weap.c
trunk/code/game/g_local.h
trunk/code/qcommon/msg.c
trunk/code/renderer/tr_init.c
Log:
fix gcc 4.2 warnings about cast from pointer to integer (#3317)
Modified: trunk/code/botlib/be_ai_goal.c
===================================================================
--- trunk/code/botlib/be_ai_goal.c 2007-08-16 15:16:32 UTC (rev 1124)
+++ trunk/code/botlib/be_ai_goal.c 2007-08-19 12:05:17 UTC (rev 1125)
@@ -134,7 +134,7 @@
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[] =
{
Modified: trunk/code/botlib/be_ai_weap.c
===================================================================
--- trunk/code/botlib/be_ai_weap.c 2007-08-16 15:16:32 UTC (rev 1124)
+++ trunk/code/botlib/be_ai_weap.c 2007-08-19 12:05:17 UTC (rev 1125)
@@ -48,8 +48,8 @@
//#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[] =
Modified: trunk/code/game/g_local.h
===================================================================
--- trunk/code/game/g_local.h 2007-08-16 15:16:32 UTC (rev 1124)
+++ trunk/code/game/g_local.h 2007-08-19 12:05:17 UTC (rev 1125)
@@ -712,7 +712,7 @@
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;
Modified: trunk/code/qcommon/msg.c
===================================================================
--- trunk/code/qcommon/msg.c 2007-08-16 15:16:32 UTC (rev 1124)
+++ trunk/code/qcommon/msg.c 2007-08-19 12:05:17 UTC (rev 1125)
@@ -790,7 +790,7 @@
} 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 @@
*/
// 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[] =
{
Modified: trunk/code/renderer/tr_init.c
===================================================================
--- trunk/code/renderer/tr_init.c 2007-08-16 15:16:32 UTC (rev 1124)
+++ trunk/code/renderer/tr_init.c 2007-08-19 12:05:17 UTC (rev 1125)
@@ -1084,7 +1084,7 @@
// 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 ) );
More information about the quake3-commits
mailing list