Skip to content

Commit

Permalink
Merge pull request #2 from ascend4/codacy-warnings
Browse files Browse the repository at this point in the history
closing with va_end.
  • Loading branch information
jdpipe committed Dec 18, 2023
2 parents e7243e3 + 813afba commit 3259b19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions ascend/compiler/statio.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ void WriteStatementError(const error_severity_t sev
va_copy(args2,args);
vfprintf_error_reporter(ASCERR,fmt,&args2);
va_end(args);
va_end(args2);
if(outputstatement){
FPRINTF(ASCERR,"\n");
WriteStatement(ASCERR,stat,4);
Expand Down
3 changes: 3 additions & 0 deletions ascend/general/panic.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ static void asc_va_panic(const int status, const char *filename, const int line
);
}
#endif

va_end(args2);
va_end(args);
}

/**
Expand Down

0 comments on commit 3259b19

Please sign in to comment.