Closed Bug 776300 Opened 12 years ago Closed 12 years ago

GCC warning: "ContentChild.cpp: warning: ‘aActor’ has incomplete type [...] note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined"

Categories

(Core :: Storage: IndexedDB, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 776108

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

Noticed this scary-looking warning today:
{
../../../mozilla/dom/ipc/ContentChild.cpp: In member function ‘virtual bool mozilla::dom::ContentChild::DeallocPIndexedDB(mozilla::dom::PContentChild::PIndexedDBChild*)’:
../../../mozilla/dom/ipc/ContentChild.cpp:454:10: warning: possible problem detected in invocation of delete operator: [enabled by default]
../../../mozilla/dom/ipc/ContentChild.cpp:452:1: warning: ‘aActor’ has incomplete type [enabled by default]
In file included from ../../../mozilla/dom/ipc/ContentChild.h:11:0,
                 from ../../../mozilla/dom/ipc/ContentChild.cpp:15:
../../ipc/ipdl/_ipdlheaders/mozilla/dom/PContentChild.h:57:7: warning: forward declaration of ‘class mozilla::dom::indexedDB::PIndexedDBChild’ [enabled by default]
../../../mozilla/dom/ipc/ContentChild.cpp:454:10: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined
}

for this chunk of code:
> 451 bool
> 452 ContentChild::DeallocPIndexedDB(PIndexedDBChild* aActor)
> 453 {
> 454   delete aActor;
> 455   return true;
> 456 }

It sounds like aActor's constructor isn't getting invoked here.  Not sure if that matters, but I'm going to tentatively assume that it does.

This function was added in bug 772700.
Summary: GCC warning: "ContentChild.cpp:454:10: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined" → GCC warning: "ContentChild.cpp: warning: ‘aActor’ has incomplete type [...] note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined"
Blocks: buildwarning
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.