Re: LO, scan coverity 708945 (non virtual destructor in parent class)
On Sat, 2013-12-07 at 12:51 -0800, julien2412 wrote: Similarly, there's CID#708952 (see https://scan5.coverity.com:8443/reports.htm#v22002/p10276/fileInstanceId=47973599defectInstanceId=14481123mergedDefectId=708952). FWIW, CID#708952 is fixed now C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: LO, scan coverity 708945 (non virtual destructor in parent class)
On Sat, 2013-12-07 at 09:17 -0800, julien2412 wrote: Hi, I took a look to https://scan5.coverity.com:8443/reports.htm#v22002/p10276/fileInstanceId=47958646defectInstanceId=14481124mergedDefectId=708945 32class SbxVarEntry : public SbxVariableRef { 33public: 34OUString* pAlias; 35SbxVarEntry() : SbxVariableRef(), pAlias( NULL ) {} CID 708945 (#1 of 1): Non-virtual destructor (VIRTUAL_DTOR)1. nonvirtual_dtor: Class SbxVarEntry has a destructor and a pointer to it is upcast to class SbxVariableRef which doesn't have a virtual destructor. 36 ~SbxVarEntry() { delete pAlias; } The code there is a tangled knot of horror, but I kind of think that SbxVarEntry should have-a SbxVariableRef rather than be an is-a so not inherit from it and have a Ref member. C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: LO, scan coverity 708945 (non virtual destructor in parent class)
Similarly, there's CID#708952 (see https://scan5.coverity.com:8443/reports.htm#v22002/p10276/fileInstanceId=47973599defectInstanceId=14481123mergedDefectId=708952). Here, there's no consequence, since there's no specific destructor in SfxListUndoAction. But if there's one in the future, it won't be taken into account since destructor of SfxUndoArray isn't virtual (see http://opengrok.libreoffice.org/xref/core/include/svl/undo.hxx#136) -- View this message in context: http://nabble.documentfoundation.org/LO-scan-coverity-708945-non-virtual-destructor-in-parent-class-tp4087082p4087118.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: LO, scan coverity 708945 (non virtual destructor in parent class)
Hi No specific destructor doesn't means no code generated, as we can see, two OUString could be leaked by not executing SfxListUndoAction destructor. Also an issue for me. 2013/12/7 julien2412 serval2...@yahoo.fr Similarly, there's CID#708952 (see https://scan5.coverity.com:8443/reports.htm#v22002/p10276/fileInstanceId=47973599defectInstanceId=14481123mergedDefectId=708952 ). Here, there's no consequence, since there's no specific destructor in SfxListUndoAction. But if there's one in the future, it won't be taken into account since destructor of SfxUndoArray isn't virtual (see http://opengrok.libreoffice.org/xref/core/include/svl/undo.hxx#136) -- View this message in context: http://nabble.documentfoundation.org/LO-scan-coverity-708945-non-virtual-destructor-in-parent-class-tp4087082p4087118.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice -- Arnaud Versini ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice