Opened 19 years ago
Closed 19 years ago
#1992 closed patch (fixed)
Warning fixes
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | trivial | Milestone: | 0.20 |
Component: | mythtv | Version: | head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
This patche fixes a few "warning: ‘class XXX’ has virtual functions but non-virtual destructor"
Attachments (2)
Change History (7)
by , 19 years ago
Attachment: | patch-warning-dtors.diff added |
---|
by , 19 years ago
Attachment: | patch-warning-dtors-v2.patch added |
---|
Less drastic fix, disable these bogus warnings. (those are interfaces, they don't need virtual dtors)
comment:2 by , 19 years ago
Milestone: | → 0.20 |
---|
comment:3 by , 19 years ago
The second patch works for me, but disabling such warnings is dangerous ! I don't think the gcc guys added this warning just for the fun. It may be ok to ignore them in this case (pure interface), but in other places we should expect destructors to not be called... and we won't have warnings to remind us any more. Adding the virtual destructors just forces subclasses to have virtual destructors, gcc is happy, and we can still be warned when necessary.
comment:4 by , 19 years ago
I'd vote for fixing the destructors. Here's some info from those who deal in reliable C++ coding
http://www.codingstandard.com/HICPPCM/Section_3.3_Class_Inheritance.html
and in particular
The patch