diff options
author | Tim Angus <tim@ngus.net> | 2013-01-12 23:55:21 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-12 23:55:21 +0000 |
commit | 0f43dc6df58569ceb32475c4a4009ea6de437923 (patch) | |
tree | dc2f7b0e108658f1591409ffed95b8e340f8cc12 /src/qcommon | |
parent | 16b581e90f1df605141d157edad1a75b4594f479 (diff) |
Fix a bunch of warnings
Diffstat (limited to 'src/qcommon')
-rw-r--r-- | src/qcommon/parse.c | 10 | ||||
-rw-r--r-- | src/qcommon/q_shared.h | 2 | ||||
-rw-r--r-- | src/qcommon/qcommon.h | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/src/qcommon/parse.c b/src/qcommon/parse.c index b1f6efde..e1332df3 100644 --- a/src/qcommon/parse.c +++ b/src/qcommon/parse.c @@ -363,7 +363,7 @@ static void Parse_CreatePunctuationTable(script_t *script, punctuation_t *punctu Parse_ScriptError =============== */ -static void QDECL Parse_ScriptError(script_t *script, char *str, ...) +__attribute__ ((format (printf, 2, 3))) static void QDECL Parse_ScriptError(script_t *script, char *str, ...) { char text[1024]; va_list ap; @@ -381,7 +381,7 @@ static void QDECL Parse_ScriptError(script_t *script, char *str, ...) Parse_ScriptWarning =============== */ -static void QDECL Parse_ScriptWarning(script_t *script, char *str, ...) +__attribute__ ((format (printf, 2, 3))) static void QDECL Parse_ScriptWarning(script_t *script, char *str, ...) { char text[1024]; va_list ap; @@ -1098,7 +1098,7 @@ static void Parse_FreeScript(script_t *script) Parse_SourceError =============== */ -static void QDECL Parse_SourceError(source_t *source, char *str, ...) +__attribute__ ((format (printf, 2, 3))) static void QDECL Parse_SourceError(source_t *source, char *str, ...) { char text[1024]; va_list ap; @@ -1114,7 +1114,7 @@ static void QDECL Parse_SourceError(source_t *source, char *str, ...) Parse_SourceWarning =============== */ -static void QDECL Parse_SourceWarning(source_t *source, char *str, ...) +__attribute__ ((format (printf, 2, 3))) static void QDECL Parse_SourceWarning(source_t *source, char *str, ...) { char text[1024]; va_list ap; @@ -1917,7 +1917,6 @@ static int Parse_EvaluateTokens(source_t *source, token_t *tokens, signed long i int questmarkintvalue = 0; double questmarkfloatvalue = 0; int gotquestmarkvalue = qfalse; - int lastoperatortype = 0; // operator_t operator_heap[MAX_OPERATORS]; int numoperators = 0; @@ -2286,7 +2285,6 @@ static int Parse_EvaluateTokens(source_t *source, token_t *tokens, signed long i } } if (error) break; - lastoperatortype = o->operator; //if not an operator with arity 1 if (o->operator != P_LOGIC_NOT && o->operator != P_BIN_NOT) diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h index 253174d1..bfb04e54 100644 --- a/src/qcommon/q_shared.h +++ b/src/qcommon/q_shared.h @@ -920,7 +920,7 @@ qboolean Info_Validate( const char *s ); void Info_NextPair( const char **s, char *key, char *value ); // this is only here so the functions in q_shared.c and bg_*.c can link -void QDECL Com_Error( int level, const char *error, ... ) __attribute__ ((noreturn, format(printf, 2, 3))); +void QDECL Com_Error( int level, const char *error, ... ) __attribute__ ((format(printf, 2, 3))); void QDECL Com_Printf( const char *msg, ... ) __attribute__ ((format (printf, 1, 2))); diff --git a/src/qcommon/qcommon.h b/src/qcommon/qcommon.h index 868bf43a..1a8ddd91 100644 --- a/src/qcommon/qcommon.h +++ b/src/qcommon/qcommon.h @@ -795,7 +795,7 @@ void Com_BeginRedirect (char *buffer, int buffersize, void (*flush)(char *)); void Com_EndRedirect( void ); void QDECL Com_Printf( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2))); void QDECL Com_DPrintf( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2))); -void QDECL Com_Error( int code, const char *fmt, ... ) __attribute__ ((noreturn, format(printf, 2, 3))); +void QDECL Com_Error( int code, const char *fmt, ... ) __attribute__ ((format(printf, 2, 3))); void Com_Quit_f( void ) __attribute__ ((noreturn)); void Com_GameRestart(int checksumFeed, qboolean disconnect); |