Closed Bug 793498 Opened 13 years ago Closed 13 years ago

nsMediaSniffer.cpp:21:2125: warning: deleting object of polymorphic class type ‘nsMediaSniffer’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]

Categories

(Core :: Audio/Video, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Build warning with GCC 4.7: { toolkit/components/mediasniffer/nsMediaSniffer.cpp: In member function ‘virtual nsrefcnt nsMediaSniffer::Release()’: toolkit/components/mediasniffer/nsMediaSniffer.cpp:21:2125: warning: deleting object of polymorphic class type ‘nsMediaSniffer’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] } Elsewhere, we've fixed this by adding the MOZ_FINAL label, and I think that's what we want here, too. Nothing derives from nsMediaSniffer at the moment, so the label is an appropriate one. Depends on: 567077
Attached patch fixSplinter Review
I verified that this compiles & fixes the build warning on my machine.
Attachment #663818 - Flags: review?(paul)
Comment on attachment 663818 [details] [diff] [review] fix Review of attachment 663818 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #663818 - Flags: review?(paul) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: