From: Ivan Maidanski Date: Wed, 7 Nov 2018 19:47:02 +0000 (+0300) Subject: Eliminate 'unreferenced formal parameter' compiler warning in msvc_dbg X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8dad87955e30b01bdae2a9b8eee2cbd7b321b482;p=gc Eliminate 'unreferenced formal parameter' compiler warning in msvc_dbg * extra/msvc_dbg.c (GetDescriptionFromAddress): Cast format argument to void. * extra/msvc_dbg.c (GetDescriptionFromStack): Pass format argument to GetDescriptionFromAddress (instead of NULL). --- diff --git a/extra/msvc_dbg.c b/extra/msvc_dbg.c index 858c67ea..22865d53 100644 --- a/extra/msvc_dbg.c +++ b/extra/msvc_dbg.c @@ -312,6 +312,7 @@ size_t GetDescriptionFromAddress(void* address, const char* format, char*const end = buffer + size; size_t line_number = 0; + (void)format; if (size) { *buffer = 0; } @@ -356,11 +357,11 @@ size_t GetDescriptionFromStack(void* const frames[], size_t count, const GC_ULONG_PTR end = begin + size; GC_ULONG_PTR buffer = begin + (count + 1) * sizeof(char*); size_t i; - (void)format; + for (i = 0; i < count; ++i) { if (description) description[i] = (char*)buffer; - buffer += 1 + GetDescriptionFromAddress(frames[i], NULL, (char*)buffer, + buffer += 1 + GetDescriptionFromAddress(frames[i], format, (char*)buffer, end < buffer ? 0 : end - buffer); } if (description)