Bug 4812 - GCC __attribute__ annotations for printf, non-returning functions etc., patch by linux@youmustbejoking.demon.co.uk and Zack Middleton
This commit is contained in:
parent
69a7ada911
commit
9dc32d55e2
30 changed files with 63 additions and 61 deletions
|
@ -290,7 +290,7 @@ extern float floattime;
|
|||
#define FloatTime() floattime
|
||||
|
||||
// from the game source
|
||||
void QDECL BotAI_Print(int type, char *fmt, ...);
|
||||
void QDECL BotAI_Print(int type, char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
void QDECL QDECL BotAI_BotInitialChat( bot_state_t *bs, char *type, ... );
|
||||
void BotAI_Trace(bsp_trace_t *bsptrace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int passent, int contentmask);
|
||||
int BotAI_GetClientState( int clientNum, playerState_t *state );
|
||||
|
|
|
@ -624,10 +624,10 @@ void SetLeader(int team, int client);
|
|||
void CheckTeamLeader( int team );
|
||||
void G_RunThink (gentity_t *ent);
|
||||
void AddTournamentQueue(gclient_t *client);
|
||||
void QDECL G_LogPrintf( const char *fmt, ... );
|
||||
void QDECL G_LogPrintf( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2)));
|
||||
void SendScoreboardMessageToAllClients( void );
|
||||
void QDECL G_Printf( const char *fmt, ... );
|
||||
void QDECL G_Error( const char *fmt, ... );
|
||||
void QDECL G_Printf( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2)));
|
||||
void QDECL G_Error( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
//
|
||||
// g_client.c
|
||||
|
|
|
@ -102,7 +102,7 @@ const char *TeamColorString(int team) {
|
|||
}
|
||||
|
||||
// NULL for everyone
|
||||
void QDECL PrintMsg( gentity_t *ent, const char *fmt, ... ) {
|
||||
static __attribute__ ((format (printf, 2, 3))) void QDECL PrintMsg( gentity_t *ent, const char *fmt, ... ) {
|
||||
char msg[1024];
|
||||
va_list argptr;
|
||||
char *p;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue