Bug 539585: Fix warning "warning: format '%p' expects type 'void *'" in xpcom directory. r=bsmedberg

This commit is contained in:
Daniel Holbert
2010-03-05 10:41:25 -08:00
parent 7535852edc
commit b08fb8e197
3 changed files with 9 additions and 5 deletions

View File

@@ -86,13 +86,15 @@ Foo::Foo(PRInt32 aID)
{
mID = aID;
++gCount;
fprintf(stdout, "init: %d (%p), %d total)\n", mID, this, gCount);
fprintf(stdout, "init: %d (%p), %d total)\n",
mID, static_cast<void*>(this), gCount);
}
Foo::~Foo()
{
--gCount;
fprintf(stdout, "destruct: %d (%p), %d remain)\n", mID, this, gCount);
fprintf(stdout, "destruct: %d (%p), %d remain)\n",
mID, static_cast<void*>(this), gCount);
}
NS_IMPL_ISUPPORTS1(Foo, IFoo)
@@ -124,7 +126,8 @@ void DumpArray(nsISupportsArray* aArray, PRInt32 aExpectedCount, PRInt32 aElemen
for (index = 0; (index < count) && (index < aExpectedCount); index++) {
IFoo* foo = (IFoo*)(aArray->ElementAt(index));
fprintf(stdout, "%2d: %d=%d (%p) c: %d %s\n",
index, aElementIDs[index], foo->ID(), foo, foo->RefCnt() - 1,
index, aElementIDs[index], foo->ID(),
static_cast<void*>(foo), foo->RefCnt() - 1,
AssertEqual(foo->ID(), aElementIDs[index]));
foo->Release();
}