dlls/ntdll/heap.c debug trace fixes
Gerald Pfeifer
gerald at pfeifer.com
Sat Sep 17 04:42:26 CDT 2005
Alexandre,
your following patch to dlls/ntdll/heap.c
revision 1.50
date: 2005-09-16 18:54:19 +0000; author: julliard; state: Exp; lines: +3 -3
Fixed a few pointer truncation bugs for 64-bit platforms.
triggers the following warnings:
heap.c:247: warning: long unsigned int format, unsigned int arg (arg 4)
heap.c:852: warning: long unsigned int format, unsigned int arg (arg 7)
For 32-bit mode, %lx is too wide for UINT, we can safely use just %x, and
unless UINT differes from unsigned int this also should be sufficient in
64-bit mode.
Gerald
ChangeLog:
Adjust two format strings in debug traces.
Index: heap.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/heap.c,v
retrieving revision 1.50
diff -u -3 -p -r1.50 heap.c
--- heap.c 16 Sep 2005 18:54:19 -0000 1.50
+++ heap.c 17 Sep 2005 09:40:09 -0000
@@ -243,7 +243,7 @@ static void HEAP_Dump( HEAP *heap )
else if (*(DWORD *)ptr & ARENA_FLAG_PREV_FREE)
{
ARENA_INUSE *pArena = (ARENA_INUSE *)ptr;
- DPRINTF( "%p Used %08lx back=%08lx\n",
+ DPRINTF( "%p Used %08lx back=%08x\n",
pArena, pArena->size & ARENA_SIZE_MASK, *((UINT_PTR *)pArena - 1) );
ptr += sizeof(*pArena) + (pArena->size & ARENA_SIZE_MASK);
arenaSize += sizeof(ARENA_INUSE);
@@ -849,7 +849,7 @@ static BOOL HEAP_ValidateFreeArena( SUBH
if (*((ARENA_FREE **)((char *)(pArena + 1) +
(pArena->size & ARENA_SIZE_MASK)) - 1) != pArena)
{
- ERR("Heap %p: arena %p has wrong back ptr %08lx\n",
+ ERR("Heap %p: arena %p has wrong back ptr %08x\n",
subheap->heap, pArena,
*((UINT_PTR *)((char *)(pArena+1) + (pArena->size & ARENA_SIZE_MASK)) - 1));
return FALSE;
More information about the wine-patches
mailing list