From d73335fb82f8e59c3b9a9fca79a9e3bdb7d1caa4 Mon Sep 17 00:00:00 2001 From: leper Date: Fri, 10 Jul 2020 19:01:56 +0200 Subject: [PATCH] Fix build on VC++. Refs #309. This was broken by 831d8e1a9173b1fb7e01f10fc1d33f42fe2da0fd. --- src/nvcore/Debug.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nvcore/Debug.cpp b/src/nvcore/Debug.cpp index f25c5ca..e9d52bd 100644 --- a/src/nvcore/Debug.cpp +++ b/src/nvcore/Debug.cpp @@ -1015,10 +1015,11 @@ void debug::dumpInfo() #endif } -static void getEmptyVAList(va_list& list, ...) +static va_list getEmptyVAList(va_list list, ...) { va_start(list, list); va_end(list); + return list; } /// 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 va_list empty; - getEmptyVAList(empty); + empty = getEmptyVAList(empty); for (uint i = 0; i < lines.count(); i++) { messageHandler->log(lines[i], empty);