Closed Bug 833505 Opened 13 years ago Closed 13 years ago

nsGIOProtocolHandler.cpp:583:888: warning: deleting object of polymorphic class type ‘nsGIOInputStream’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]

Categories

(Core :: Widget: Gtk, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Noticed some -Wdelete-non-virtual-dtor warnings in GIO/Gnome code today: { extensions/gio/nsGIOProtocolHandler.cpp:583:888: warning: deleting object of polymorphic class type ‘nsGIOInputStream’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] extensions/gio/nsGIOProtocolHandler.cpp:900:2687: warning: deleting object of polymorphic class type ‘nsGIOProtocolHandler’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] toolkit/system/gnome/nsGSettingsService.cpp:136:2708: warning: deleting object of polymorphic class type 'nsGSettingsCollection' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] toolkit/system/gnome/nsGSettingsService.cpp:322:2681: warning: deleting object of polymorphic class type 'nsGSettingsService' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] } These can all be fixed by MOZ_FINAL annotations. I'll push that with blanket-r=ehsan, per bug 829975 comment 3.
Blocks: 833547
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.