Skip to content

Commit

Permalink
gcc warning
Browse files Browse the repository at this point in the history
Signed-off-by: James Cherry <[email protected]>
  • Loading branch information
jjcherry56 committed Dec 10, 2021
1 parent fac2914 commit d138fc1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion search/WritePathSpice.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,7 @@ streamPrint(ofstream &stream,
{
va_list args;
va_start(args, fmt);
char *result;
char *result = nullptr;
if (vasprintf(&result, fmt, args) == -1)
criticalError(267, "out of memory");
stream << result;
Expand Down
9 changes: 7 additions & 2 deletions util/MachineWin32.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ namespace sta {
// Windows returns -1 if the string does not fit rather than the
// required string length as the standard specifies.
int
vsnprint(char *str, size_t size, const char *fmt, va_list args)
vsnprint(char *str,
size_t size,
const char *fmt,
va_list args)
{
// Copy args before using them because consumption is destructive.
va_list args_copy1;
Expand All @@ -37,7 +40,9 @@ vsnprint(char *str, size_t size, const char *fmt, va_list args)
}

int
vasprintf(char **str, const char *fmt, va_list args)
vasprintf(char **str,
const char *fmt,
va_list args)
{
size_t size = 1024;
for (;;) {
Expand Down

0 comments on commit d138fc1

Please sign in to comment.