More -Werror,-Wunused-private-field

Desktop / LibreOffice - Stephan Bergmann [redhat.com] - 15 October 2014 08:58 UTC

...detected with a modified trunk Clang with

> Index: lib/Sema/SemaDeclCXX.cpp > =================================================================== > --- lib/Sema/SemaDeclCXX.cpp (revision 219190) > +++ lib/Sema/SemaDeclCXX.cpp (working copy) > @@ -1917,9 +1917,10 @@ > const Type *T = FD.getType()->getBaseElementTypeUnsafe(); > // FIXME: Destruction of ObjC lifetime types has side-effects. > if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) > - return !RD->isCompleteDefinition() || > - !RD->hasTrivialDefaultConstructor() || > - !RD->hasTrivialDestructor(); > + return !RD->hasAttr() && > + (!RD->isCompleteDefinition() || > + !RD->hasTrivialDefaultConstructor() || > + !RD->hasTrivialDestructor()); > return false; > } > > @@ -3517,9 +3518,11 @@ > bool addFieldInitializer(CXXCtorInitializer *Init) { > AllToInit.push_back(Init); > > +#if 0 > // Check whether this initializer makes the field "used". > if (Init->getInit()->HasSideEffects(S.Context)) > S.UnusedPrivateFields.remove(Init->getAnyMember()); > +#endif > > return false; > }

to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about initializations with side effects (cf. "-Wunused-private-field distracted by side effects").

ad9498f More -Werror,-Wunused-private-field
.../extended/AccessibleGridControlHeaderCell.hxx | 2 --
basctl/source/inc/managelang.hxx | 1 -
basic/inc/sbobjmod.hxx | 1 -
.../controller/chartapiwrapper/AxisWrapper.hxx | 1 -
chart2/source/view/charttypes/GL3DBarChart.cxx | 1 -
.../officeinstallationdirectories.cxx | 1 -
.../officeinstallationdirectories.hxx | 1 -
connectivity/source/drivers/mork/MQueryHelper.hxx | 1 -
.../postgresql/pq_sequenceresultsetmetadata.hxx | 2 --
connectivity/source/inc/mysql/YDriver.hxx | 1 -
cui/source/dialogs/SpellDialog.cxx | 1 -
cui/source/dialogs/colorpicker.cxx | 2 --
cui/source/inc/about.hxx | 1 -
cui/source/inc/autocdlg.hxx | 5 -----
cui/source/inc/cuitabarea.hxx | 1 -
cui/source/inc/optlingu.hxx | 1 -
cui/source/inc/page.hxx | 1 -
cui/source/tabpages/tpcolor.cxx | 1 -
dbaccess/source/core/api/RowSet.hxx | 1 -
dbaccess/source/filter/xml/xmlStyleImport.cxx | 1 -
dbaccess/source/filter/xml/xmlStyleImport.hxx | 2 --
dbaccess/source/ui/dlg/detailpages.hxx | 5 -----
dbaccess/source/ui/dlg/tablespage.hxx | 2 --
dbaccess/source/ui/inc/CollectionView.hxx | 2 --
dbaccess/source/ui/inc/brwctrlr.hxx | 2 --
dbaccess/source/ui/inc/opendoccontrols.hxx | 1 -
dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx | 1 -
desktop/source/deployment/gui/dp_gui_dialog2.cxx | 1 -
desktop/source/deployment/gui/dp_gui_dialog2.hxx | 2 --
.../source/deployment/gui/dp_gui_extlistbox.hxx | 1 -
desktop/source/deployment/gui/license_dialog.hxx | 1 -
extensions/source/plugin/base/context.cxx | 8 ++------
filter/source/graphicfilter/eos2met/eos2met.cxx | 1 -
filter/source/xsltdialog/typedetectionimport.cxx | 4 +---
filter/source/xsltdialog/typedetectionimport.hxx | 4 ----
filter/source/xsltdialog/xmlfilterjar.cxx | 1 -
filter/source/xsltdialog/xmlfilterjar.hxx | 1 -
filter/source/xsltdialog/xmlfiltertabpagexslt.cxx | 4 ----
filter/source/xsltdialog/xmlfiltertabpagexslt.hxx | 4 ----
framework/inc/classes/fwktabwindow.hxx | 1 -
framework/inc/dispatch/startmoduledispatcher.hxx | 9 +--------
framework/inc/xml/menudocumenthandler.hxx | 1 -
.../globalacceleratorconfiguration.cxx | 2 --
framework/source/dispatch/dispatchprovider.cxx | 2 +-
.../source/dispatch/startmoduledispatcher.cxx | 4 +---
framework/source/fwe/classes/addonsoptions.cxx | 7 +------
framework/source/services/tabwindowservice.cxx | 3 ---
.../source/uiconfiguration/globalsettings.cxx | 2 --
.../source/uielement/uicommanddescription.cxx | 3 ---
helpcompiler/source/HelpSearch.cxx | 3 +--
i18npool/inc/indexentrysupplier.hxx | 1 -
idl/inc/database.hxx | 1 -
include/basic/modsizeexceeded.hxx | 1 -
include/helpcompiler/HelpSearch.hxx | 4 +---
include/oox/ppt/soundactioncontext.hxx | 2 --
include/svx/bmpmask.hxx | 1 -
include/svx/numvset.hxx | 1 -
include/svx/tbcontrl.hxx | 1 -
include/toolkit/controls/unocontrols.hxx | 1 -
include/vcl/edit.hxx | 1 -
include/xmloff/XMLTextMasterPageContext.hxx | 1 -
include/xmloff/xmlnume.hxx | 2 --
include/xmloff/xmlnumfi.hxx | 1 -
include/xmloff/xmlnumi.hxx | 1 -
lotuswordpro/source/filter/lwpbulletstylemgr.hxx | 1 -
lotuswordpro/source/filter/lwptablelayout.hxx | 1 -
lotuswordpro/source/filter/xfilter/xfcell.hxx | 1 -
lotuswordpro/source/filter/xfilter/xfindex.hxx | 3 ---
oox/source/ppt/timenodelistcontext.cxx | 2 --
reportdesign/source/filter/xml/xmlfilter.hxx | 1 -
sal/qa/osl/file/osl_File.cxx | 7 -------
sal/qa/rtl/uri/rtl_Uri.cxx | 1 -
sax/source/expatwrap/saxwriter.cxx | 4 +---
sc/inc/AccessibleFilterMenuItem.hxx | 1 -
sc/source/filter/excel/xiformula.cxx | 4 +---
sc/source/filter/excel/xilink.cxx | 2 --
sc/source/filter/inc/drawingmanager.hxx | 3 ---
sc/source/filter/oox/worksheethelper.cxx | 2 --
sc/source/filter/xml/XMLEmptyContext.hxx | 2 --
.../ui/Accessibility/AccessibleFilterMenuItem.cxx | 1 -
sc/source/ui/dbgui/dpgroupdlg.cxx | 1 -
sc/source/ui/dbgui/pfiltdlg.cxx | 1 -
sc/source/ui/inc/acredlin.hxx | 1 -
sc/source/ui/inc/dpgroupdlg.hxx | 1 -
sc/source/ui/inc/fuconpol.hxx | 2 --
sc/source/ui/inc/highred.hxx | 1 -
sc/source/ui/inc/pfiltdlg.hxx | 1 -
sc/source/ui/inc/scuiautofmt.hxx | 1 -
sc/source/ui/inc/simpref.hxx | 6 +-----
sc/source/ui/inc/tabbgcolordlg.hxx | 1 -
sc/source/ui/miscdlgs/scuiautofmt.cxx | 1 -
sc/source/ui/miscdlgs/simpref.cxx | 4 +---
sc/source/ui/miscdlgs/tabbgcolordlg.cxx | 1 -
sc/source/ui/vba/vbaworkbooks.cxx | 5 ++---
sc/source/ui/view/tabvwshc.cxx | 2 +-
scripting/source/basprov/basprov.hxx | 1 -
sd/source/filter/html/htmlex.cxx | 2 --
sd/source/filter/html/htmlex.hxx | 2 --
sd/source/filter/html/sdhtmlfilter.cxx | 6 +-----
.../slidesorter/controller/SlsSelectionManager.cxx | 1 -
.../controller/SlsSelectionObserver.cxx | 1 -
.../inc/controller/SlsSelectionManager.hxx | 1 -
.../inc/controller/SlsSelectionObserver.hxx | 1 -
.../slidesorter/inc/view/SlsPageObjectPainter.hxx | 1 -
sd/source/ui/table/TableDesignPane.cxx | 1 -
sd/source/ui/table/TableDesignPane.hxx | 1 -
sd/source/ui/view/DocumentRenderer.cxx | 1 -
.../presenter/PresenterFrameworkObserver.hxx | 1 -
sfx2/inc/srchdlg.hxx | 1 -
sfx2/source/appl/newhelp.hxx | 1 -
sfx2/source/sidebar/Deck.cxx | 2 --
sfx2/source/sidebar/Deck.hxx | 3 ---
starmath/inc/dialog.hxx | 1 -
svtools/source/config/helpopt.cxx | 1 -
svx/source/inc/docrecovery.hxx | 1 -
svx/source/sidebar/area/AreaPropertyPanel.hxx | 1 -
.../sidebar/possize/PosSizePropertyPanel.hxx | 12 ------------
sw/inc/expfld.hxx | 1 -
sw/source/core/inc/UndoTable.hxx | 1 -
sw/source/core/undo/untbl.cxx | 1 -
sw/source/filter/xml/xmlfmte.cxx | 4 +---
sw/source/filter/xml/xmltbli.cxx | 6 ++----
sw/source/filter/xml/xmltbli.hxx | 5 +----
sw/source/ui/dbui/addresslistdialog.hxx | 1 -
sw/source/ui/dbui/mmoutputpage.hxx | 2 --
sw/source/ui/dbui/mmoutputtypepage.cxx | 2 --
sw/source/ui/index/cnttab.cxx | 8 +++-----
sw/source/uibase/inc/frmpage.hxx | 1 -
ucb/source/ucp/ftp/ftpcontent.cxx | 3 +--
ucb/source/ucp/ftp/ftpintreq.cxx | 3 +--
ucb/source/ucp/ftp/ftpintreq.hxx | 4 +---
ucb/source/ucp/ftp/ftpurl.cxx | 3 +--
ucb/source/ucp/ftp/ftpurl.hxx | 2 --
vbahelper/source/msforms/vbacombobox.hxx | 1 -
vbahelper/source/msforms/vbalistbox.hxx | 2 --
vbahelper/source/msforms/vbatogglebutton.hxx | 1 -
vcl/generic/print/prtsetup.cxx | 5 ++---
vcl/generic/print/prtsetup.hxx | 6 +-----
vcl/inc/helpwin.hxx | 1 -
vcl/unx/generic/dtrans/X11_transferable.hxx | 2 --
writerfilter/source/ooxml/Handler.hxx | 1 -
writerfilter/source/ooxml/OOXMLParserState.hxx | 1 -
.../source/cxxhelp/provider/resultsetforquery.cxx | 3 +--
xmloff/inc/XMLTextColumnsContext.hxx | 1 -
xmloff/inc/txtflde.hxx | 6 ------
xmloff/inc/txtfldi.hxx | 6 ------
xmloff/inc/txtvfldi.hxx | 10 ----------
xmloff/source/chart/SchXMLChartContext.hxx | 1 -
.../chart/SchXMLRegressionCurveObjectContext.cxx | 2 --
.../chart/SchXMLRegressionCurveObjectContext.hxx | 2 --
xmloff/source/chart/SchXMLSeries2Context.cxx | 2 +-
xmloff/source/draw/sdpropls.cxx | 6 +-----
xmloff/source/draw/sdpropls.hxx | 8 --------
xmloff/source/style/xmlnumi.cxx | 1 -
xmloff/source/text/XMLAutoTextEventExport.cxx | 3 ---
xmloff/source/text/XMLAutoTextEventExport.hxx | 4 ----
.../source/text/XMLChangedRegionImportContext.hxx | 2 --
xmloff/source/text/XMLIndexTOCContext.cxx | 1 -
xmloff/source/text/XMLIndexTOCContext.hxx | 1 -
xmloff/source/text/XMLIndexTOCSourceContext.hxx | 1 -
xmloff/source/text/XMLRedlineExport.cxx | 3 ---
xmloff/source/text/XMLRedlineExport.hxx | 3 ---
xmloff/source/text/XMLSectionExport.cxx | 2 --
xmloff/source/text/XMLSectionExport.hxx | 2 --
xmloff/source/text/XMLTextColumnsContext.cxx | 1 -
xmloff/source/text/XMLTextFrameContext.cxx | 2 --
xmloff/source/text/XMLTextMasterPageContext.cxx | 1 -
xmloff/source/text/txtflde.cxx | 6 ------
xmloff/source/text/txtfldi.cxx | 1 -
xmloff/source/text/txtparai.cxx | 3 ---
xmloff/source/text/txtvfldi.cxx | 5 +----
171 files changed, 35 insertions(+), 359 deletions(-)

Upstream: cgit.freedesktop.org


  • Share