]> granicus.if.org Git - gc/commitdiff
Adjust printf format specifiers in GC_print_trace
authorIvan Maidanski <ivmai@mail.ru>
Sun, 23 Dec 2012 09:13:37 +0000 (13:13 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 23 Dec 2012 09:13:37 +0000 (13:13 +0400)
* mark.c (GC_print_trace): Adjust printf format specifier for
arguments of word type (cast to long type).
* mark.c (GC_print_trace): Replace printf() call with GC_printf.

mark.c

diff --git a/mark.c b/mark.c
index 8ef7c57524a4babc46cfe1cfc26094d30b027f58..08753b67cfb51f7169174c02458e2f04a49fbe91 100644 (file)
--- a/mark.c
+++ b/mark.c
@@ -1467,12 +1467,12 @@ void GC_print_trace(word gc_no, GC_bool lock)
             if (lock) UNLOCK();
             return;
         }
-        printf("Trace:%s (gc:%u,bytes:%lu) 0x%X, 0x%X\n",
-                p -> kind, (unsigned)p -> gc_no,
-                (unsigned long)p -> bytes_allocd,
-                (p -> arg1) ^ 0x80000000, (p -> arg2) ^ 0x80000000);
+        GC_printf("Trace:%s (gc:%u, bytes:%lu) 0x%lX, 0x%lX\n",
+                  p -> kind, (unsigned)p -> gc_no,
+                  (unsigned long)p -> bytes_allocd,
+                  (long)p->arg1 ^ 0x80000000L, (long)p->arg2 ^ 0x80000000L);
     }
-    printf("Trace incomplete\n");
+    GC_printf("Trace incomplete\n");
     if (lock) UNLOCK();
 }