Merge pull request #322 from leper/fix_va_list_vcpp

Fix build on VC++. Refs #309.
pull/328/head
Ignacio 4 years ago committed by GitHub
commit aeb84b5ffa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1015,10 +1015,11 @@ void debug::dumpInfo()
#endif #endif
} }
static void getEmptyVAList(va_list& list, ...) static va_list getEmptyVAList(va_list list, ...)
{ {
va_start(list, list); va_start(list, list);
va_end(list); va_end(list);
return list;
} }
/// Dump callstack using the specified handler. /// Dump callstack using the specified handler.
@ -1034,7 +1035,7 @@ void debug::dumpCallstack(MessageHandler *messageHandler, int callstackLevelsToS
writeStackTrace(trace, size, callstackLevelsToSkip + 1, lines); // + 1 to skip the call to dumpCallstack writeStackTrace(trace, size, callstackLevelsToSkip + 1, lines); // + 1 to skip the call to dumpCallstack
va_list empty; va_list empty;
getEmptyVAList(empty); empty = getEmptyVAList(empty);
for (uint i = 0; i < lines.count(); i++) { for (uint i = 0; i < lines.count(); i++) {
messageHandler->log(lines[i], empty); messageHandler->log(lines[i], empty);

Loading…
Cancel
Save