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)
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.09 KB,
patch
|
padenot
:
review+
|
Details | Diff | Splinter Review |
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
Assignee | ||
Comment 1•13 years ago
|
||
I verified that this compiles & fixes the build warning on my machine.
Attachment #663818 -
Flags: review?(paul)
Comment 2•13 years ago
|
||
Comment on attachment 663818 [details] [diff] [review]
fix
Review of attachment 663818 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
Attachment #663818 -
Flags: review?(paul) → review+
Assignee | ||
Comment 3•13 years ago
|
||
Blocks: buildwarning
Comment 4•13 years ago
|
||
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.
Description
•