From f0fc390a026dfff392ba465b76f60f3f0e5a70e2 Mon Sep 17 00:00:00 2001 From: ludwig Date: Sat, 30 Dec 2006 12:32:54 +0000 Subject: - 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 --- code/game/bg_lib.h | 2 +- code/game/g_session.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'code/game') 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", -- cgit v1.2.3