mirror of
https://github.com/ZDoom/acc.git
synced 2025-01-31 03:10:34 +00:00
- Apparently, va_list is a reference type on x86_64 Linux systems, so
veprintf() needs to make a copy to pass to the second call to vfprintf(), since it will be modified by the first call. - Removed three warnings when compiling with GCC 4.3. SVN r1328 (trunk)
This commit is contained in:
parent
d6914c22ed
commit
0157077f3f
2 changed files with 14 additions and 3 deletions
11
error.c
11
error.c
|
@ -411,9 +411,20 @@ static void eprintf(const char *fmt, ...)
|
|||
|
||||
static void veprintf(const char *fmt, va_list args)
|
||||
{
|
||||
#ifdef va_copy
|
||||
va_list copy;
|
||||
va_copy(copy, args);
|
||||
#endif
|
||||
vfprintf(stderr, fmt, args);
|
||||
if(ErrorFile)
|
||||
{
|
||||
#ifdef va_copy
|
||||
vfprintf(ErrorFile, fmt, copy);
|
||||
#else
|
||||
vfprintf(ErrorFile, fmt, args);
|
||||
#endif
|
||||
}
|
||||
#ifdef va_copy
|
||||
va_end(copy);
|
||||
#endif
|
||||
}
|
||||
|
|
6
parse.c
6
parse.c
|
@ -860,7 +860,7 @@ static void OuterFunction(void)
|
|||
|
||||
TK_TokenMustBe(TK_LBRACE, ERR_MISSING_LBRACE);
|
||||
TK_NextToken();
|
||||
do ; while(ProcessStatement(STMT_SCRIPT) == YES);
|
||||
do {} while(ProcessStatement(STMT_SCRIPT) == YES);
|
||||
|
||||
if(pc_LastAppendedCommand != PCD_RETURNVOID &&
|
||||
pc_LastAppendedCommand != PCD_RETURNVAL)
|
||||
|
@ -1390,7 +1390,7 @@ static void LeadingCompoundStatement(statement_t owner)
|
|||
{
|
||||
StatementLevel += AdjustStmtLevel[owner];
|
||||
TK_NextToken(); // Eat the TK_LBRACE
|
||||
do ; while(ProcessStatement(owner) == YES);
|
||||
do {} while(ProcessStatement(owner) == YES);
|
||||
TK_TokenMustBe(TK_RBRACE, ERR_INVALID_STATEMENT);
|
||||
TK_NextToken();
|
||||
StatementLevel -= AdjustStmtLevel[owner];
|
||||
|
@ -1447,7 +1447,7 @@ static void LeadingVarDeclare(void)
|
|||
if(tk_Token == TK_LBRACKET)
|
||||
{
|
||||
ERR_Error(ERR_ARRAY_MAPVAR_ONLY, YES);
|
||||
do ; while(TK_NextToken() != TK_COMMA && tk_Token != TK_SEMICOLON);
|
||||
do {} while(TK_NextToken() != TK_COMMA && tk_Token != TK_SEMICOLON);
|
||||
}
|
||||
else if(tk_Token == TK_ASSIGN)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue