Wrap __attribute__s in macros

This commit is contained in:
Tim Angus committed 2025-09-07 17:16:31 +01:00
1 parent f976711fb4
commit 07b9c1bd83
33 files changed
+88 -114

No files matched your search

+1 -1
View File
@@ -284,7 +284,7 @@ extern float floattime;
#define FloatTime() floattime
// from the game source
void QDECL BotAI_Print(int type, char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
void QDECL BotAI_Print(int type, char *fmt, ...) Q_PRINTF_FUNC(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 );
+1 -8
View File
@@ -26,13 +26,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#if !defined( BG_LIB_H ) && defined( Q3_VM )
#define BG_LIB_H
//Ignore __attribute__ on non-gcc platforms
#ifndef __GNUC__
#ifndef __attribute__
#define __attribute__(x)
#endif
#endif
#ifndef NULL
#define NULL ((void *)0)
#endif
@@ -103,7 +96,7 @@ long strtol( const char *nptr, char **endptr, int base );
int Q_vsnprintf( char *buffer, size_t length, const char *fmt, va_list argptr );
int sscanf( const char *buffer, const char *fmt, ... ) __attribute__ ((format (scanf, 2, 3)));
int sscanf( const char *buffer, const char *fmt, ... ) Q_SCANF_FUNC(2, 3);
// Memory functions
void *memmove( void *dest, const void *src, size_t count );
+4 -4
View File
@@ -604,10 +604,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, ... ) __attribute__ ((format (printf, 1, 2)));
void QDECL G_LogPrintf( const char *fmt, ... ) Q_PRINTF_FUNC(1, 2);
void SendScoreboardMessageToAllClients( void );
void QDECL G_Printf( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2)));
void QDECL G_Error( const char *fmt, ... ) __attribute__ ((noreturn, format (printf, 1, 2)));
void QDECL G_Printf( const char *fmt, ... ) Q_PRINTF_FUNC(1, 2);
void QDECL G_Error( const char *fmt, ... ) Q_NO_RETURN Q_PRINTF_FUNC(1, 2);
//
// g_client.c
@@ -747,7 +747,7 @@ extern vmCvar_t g_proxMineTimeout;
extern vmCvar_t g_localTeamPref;
void trap_Print( const char *text );
void trap_Error( const char *text ) __attribute__((noreturn));
void trap_Error( const char *text ) Q_NO_RETURN;
int trap_Milliseconds( void );
int trap_RealTime( qtime_t *qtime );
int trap_Argc( void );
+1 -1
View File
@@ -92,7 +92,7 @@ const char *TeamColorString(int team) {
}
// NULL for everyone
static __attribute__ ((format (printf, 2, 3))) void QDECL PrintMsg( gentity_t *ent, const char *fmt, ... ) {
static Q_PRINTF_FUNC(2, 3) void QDECL PrintMsg( gentity_t *ent, const char *fmt, ... ) {
char msg[1024];
va_list argptr;
char *p;