]> granicus.if.org Git - gc/commitdiff
Eliminate 'unreferenced formal parameter' compiler warning in msvc_dbg
authorIvan Maidanski <ivmai@mail.ru>
Wed, 7 Nov 2018 19:47:02 +0000 (22:47 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 7 Nov 2018 19:47:02 +0000 (22:47 +0300)
* extra/msvc_dbg.c (GetDescriptionFromAddress): Cast format argument
to void.
* extra/msvc_dbg.c (GetDescriptionFromStack): Pass format argument to
GetDescriptionFromAddress (instead of NULL).

extra/msvc_dbg.c

index 858c67ea035506fe115a41f29d56280a045d6e61..22865d534327ab49525e016af786b4e06a3f5965 100644 (file)
@@ -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)