From: Ivan Maidanski Date: Sun, 23 Dec 2012 09:13:37 +0000 (+0400) Subject: Adjust printf format specifiers in GC_print_trace X-Git-Tag: gc7_4_0~106 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2743a59eac81dfe9c79961e1e36fa0b4dc0be329;p=gc Adjust printf format specifiers in GC_print_trace * 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. --- diff --git a/mark.c b/mark.c index 8ef7c575..08753b67 100644 --- 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(); }