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
Родитель 04b70f20d6
Коммит b79ca296da
3 изменённых файлов: 9 добавлений и 5 удалений

Просмотреть файл

@ -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();
}

Просмотреть файл

@ -89,7 +89,8 @@ public:
void LogAction(Object* aObj, const char* aAction) {
if (logging) {
printf("%d %p(%d): %s\n", PR_IntervalNow(), aObj, aObj->mLastUsed, aAction);
printf("%d %p(%d): %s\n", PR_IntervalNow(),
static_cast<void*>(aObj), aObj->mLastUsed, aAction);
}
}

Просмотреть файл

@ -404,7 +404,7 @@ XPT_DumpInterfaceDirectoryEntry(XPTCursor *cursor,
fprintf(stdout, "%*sNamespace: %s\n",
indent, " ", ide->name_space ? ide->name_space : "none");
fprintf(stdout, "%*sAddress of interface descriptor: %p\n",
indent, " ", ide->interface_descriptor);
indent, " ", (void*)(ide->interface_descriptor));
fprintf(stdout, "%*sDescriptor:\n", indent, " ");