aboutsummaryrefslogtreecommitdiffstats
path: root/code/game
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-12-30 12:32:54 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-12-30 12:32:54 +0000
commitf0fc390a026dfff392ba465b76f60f3f0e5a70e2 (patch)
treeadd91b1a36f3c11bf1b5b6a5fd5aea145c1fef52 /code/game
parentca2cf9c99df7ee76f13b7c9fa2d6ad706a3968fa (diff)
downloadioquake3-aero-f0fc390a026dfff392ba465b76f60f3f0e5a70e2.tar.gz
ioquake3-aero-f0fc390a026dfff392ba465b76f60f3f0e5a70e2.zip
- tag more functions with gnu format attribute
- fix format string bugs. still some left git-svn-id: svn://svn.icculus.org/quake3/trunk@1023 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/game')
-rw-r--r--code/game/bg_lib.h2
-rw-r--r--code/game/g_session.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/code/game/bg_lib.h b/code/game/bg_lib.h
index 467d59d..493afa2 100644
--- a/code/game/bg_lib.h
+++ b/code/game/bg_lib.h
@@ -76,7 +76,7 @@ int atoi( const char *string );
int _atoi( const char **stringPtr );
int vsprintf( char *buffer, const char *fmt, va_list argptr );
-int sscanf( const char *buffer, const char *fmt, ... );
+int sscanf( const char *buffer, const char *fmt, ... ) __attribute__ ((format (scanf, 2, 3)));
// Memory functions
void *memmove( void *dest, const void *src, size_t count );
diff --git a/code/game/g_session.c b/code/game/g_session.c
index a39b2f2..89bceec 100644
--- a/code/game/g_session.c
+++ b/code/game/g_session.c
@@ -54,7 +54,7 @@ void G_WriteClientSessionData( gclient_t *client ) {
client->sess.teamLeader
);
- var = va( "session%i", client - level.clients );
+ var = va( "session%i", (int)(client - level.clients) );
trap_Cvar_Set( var, s );
}
@@ -75,7 +75,7 @@ void G_ReadSessionData( gclient_t *client ) {
int spectatorState;
int sessionTeam;
- var = va( "session%i", client - level.clients );
+ var = va( "session%i", (int)(client - level.clients) );
trap_Cvar_VariableStringBuffer( var, s, sizeof(s) );
sscanf( s, "%i %i %i %i %i %i %i",