summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-10-15 15:58:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-10-15 15:58:56 +0200
commitad9498f8b888f7851a8612b8d654a2bc89005925 (patch)
treeff7e98ce301121fdddf44f2fc8cb42bd2b1fac4f /sw
parenteea16cb3e65a4308caddb7618d31a76ca259dbb1 (diff)
More -Werror,-Wunused-private-field
...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<WarnUnusedAttr>() && > + (!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. <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html> "-Wunused-private-field distracted by side effects"). Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/expfld.hxx1
-rw-r--r--sw/source/core/inc/UndoTable.hxx1
-rw-r--r--sw/source/core/undo/untbl.cxx1
-rw-r--r--sw/source/filter/xml/xmlfmte.cxx4
-rw-r--r--sw/source/filter/xml/xmltbli.cxx6
-rw-r--r--sw/source/filter/xml/xmltbli.hxx5
-rw-r--r--sw/source/ui/dbui/addresslistdialog.hxx1
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx8
-rw-r--r--sw/source/uibase/inc/frmpage.hxx1
11 files changed, 7 insertions, 25 deletions
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index ff324a831fc7..ac04f540eff4 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -212,7 +212,6 @@ class SW_DLLPUBLIC SwSetExpField : public SwFormulaField
{
OUString sExpand;
OUString aPText;
- OUString aSeqText;
bool bInput;
sal_uInt16 nSeqNo;
sal_uInt16 nSubType;
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index 256ed9ee9908..8eb9ba3a76fa 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -106,7 +106,6 @@ class SwUndoTblToTxt : public SwUndo
SwTblToTxtSaves* pBoxSaves;
SwHistory* pHistory;
sal_uLong nSttNd, nEndNd;
- sal_uInt16 nAdjust;
sal_Unicode cTrenner;
sal_uInt16 nHdlnRpt;
bool bCheckNumFmt : 1;
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 5172236397cf..aafa683e289b 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -402,7 +402,6 @@ SwUndoTblToTxt::SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh )
: SwUndo( UNDO_TABLETOTEXT ),
sTblNm( rTbl.GetFrmFmt()->GetName() ), pDDEFldType( 0 ), pHistory( 0 ),
nSttNd( 0 ), nEndNd( 0 ),
- nAdjust( static_cast<sal_uInt16>(rTbl.GetFrmFmt()->GetHoriOrient().GetHoriOrient()) ),
cTrenner( cCh ), nHdlnRpt( rTbl.GetRowsToRepeat() )
{
pTblSave = new _SaveTable( rTbl );
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index d13df377e6e9..6f92051f3fee 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -253,7 +253,6 @@ class SwXMLAutoStylePoolP : public SvXMLAutoStylePoolP
SvXMLExport& rExport;
const OUString sListStyleName;
const OUString sMasterPageName;
- const OUString sCDATA;
protected:
@@ -329,8 +328,7 @@ SwXMLAutoStylePoolP::SwXMLAutoStylePoolP(SvXMLExport& rExp ) :
SvXMLAutoStylePoolP( rExp ),
rExport( rExp ),
sListStyleName( GetXMLToken( XML_LIST_STYLE_NAME ) ),
- sMasterPageName( GetXMLToken( XML_MASTER_PAGE_NAME ) ),
- sCDATA( GetXMLToken( XML_CDATA ) )
+ sMasterPageName( GetXMLToken( XML_MASTER_PAGE_NAME ) )
{
}
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 3aa355b1722d..fdc0bbc0c045 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -643,7 +643,7 @@ SvXMLImportContext *SwXMLTableCellContext_Impl::CreateChildContext(
{
SwXMLTableContext *pTblContext =
new SwXMLTableContext( GetSwImport(), nPrefix, rLocalName,
- xAttrList, GetTable(), sXmlId );
+ xAttrList, GetTable() );
pContext = pTblContext;
if( GetTable()->IsValid() )
InsertContent( pTblContext );
@@ -1418,10 +1418,8 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
sal_uInt16 nPrfx,
const OUString& rLName,
const Reference< xml::sax::XAttributeList > &,
- SwXMLTableContext *pTable,
- OUString const & i_rXmlId ) :
+ SwXMLTableContext *pTable ) :
XMLTextTableContext( rImport, nPrfx, rLName ),
- mXmlId( i_rXmlId ),
pColumnDefaultCellStyleNames( 0 ),
pRows( new SwXMLTableRows_Impl ),
pTableNode( pTable->pTableNode ),
diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx
index c69fbf4b0d1c..9aff5f9e40c3 100644
--- a/sw/source/filter/xml/xmltbli.hxx
+++ b/sw/source/filter/xml/xmltbli.hxx
@@ -50,8 +50,6 @@ class SwXMLTableContext : public XMLTextTableContext
{
OUString aStyleName;
OUString aDfltCellStyleName;
- /// NB: this contains the xml:id only if this table is a subtable!
- OUString mXmlId;
//! Holds basic information about a column's width.
struct ColumnWidthInfo {
@@ -142,8 +140,7 @@ public:
const OUString& rLName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList > & xAttrList,
- SwXMLTableContext *pTable,
- const OUString& i_rXmlId );
+ SwXMLTableContext *pTable );
virtual ~SwXMLTableContext();
diff --git a/sw/source/ui/dbui/addresslistdialog.hxx b/sw/source/ui/dbui/addresslistdialog.hxx
index 3ffe5360e6c5..50812efef486 100644
--- a/sw/source/ui/dbui/addresslistdialog.hxx
+++ b/sw/source/ui/dbui/addresslistdialog.hxx
@@ -62,7 +62,6 @@ class SwAddressListDialog : public SfxModalDialog
OUString m_sTable;
OUString m_sConnecting;
- OUString m_sCreatedURL;
SvTreeListEntry* m_pCreatedDataSource;
bool m_bInSelectHdl;
diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx
index 42256f407f22..735501688d3e 100644
--- a/sw/source/ui/dbui/mmoutputpage.hxx
+++ b/sw/source/ui/dbui/mmoutputpage.hxx
@@ -156,13 +156,11 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog
OUString m_sContinue;
OUString m_sStop;
- OUString m_sSend;
OUString m_sTransferStatus;
OUString m_sErrorStatus;
OUString m_sSendingTo;
OUString m_sCompleted;
OUString m_sFailed;
- OUString m_sTerminateQuery;
bool m_bCancel;
bool m_bDesctructionEnabled;
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 0fe5dae3a84c..9c849c025e50 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -236,13 +236,11 @@ SwSendMailDialog::SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem&
m_pClose(get<PushButton>("close")),
m_sContinue(SW_RES( ST_CONTINUE )),
m_sStop(m_pStop->GetText()),
- m_sSend(SW_RES(ST_SEND)),
m_sTransferStatus(m_pTransferStatus->GetText()),
m_sErrorStatus( m_pErrorStatus->GetText()),
m_sSendingTo( SW_RES(ST_SENDINGTO )),
m_sCompleted( SW_RES(ST_COMPLETED )),
m_sFailed( SW_RES(ST_FAILED )),
- m_sTerminateQuery( SW_RES( ST_TERMINATEQUERY )),
m_bCancel(false),
m_bDesctructionEnabled(false),
m_aImageList( SW_RES( ILIST ) ),
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 2ebdcee14dcd..9d26b38d0f42 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -191,14 +191,13 @@ class SwAutoMarkDlg_Impl : public ModalDialog
SwEntryBrowseBox* m_pEntriesBB;
OUString sAutoMarkURL;
- const OUString sAutoMarkType;
bool bCreateMode;
DECL_LINK(OkHdl, void *);
public:
SwAutoMarkDlg_Impl(vcl::Window* pParent, const OUString& rAutoMarkURL,
- const OUString& rAutoMarkType, bool bCreate);
+ bool bCreate);
virtual ~SwAutoMarkDlg_Impl();
};
@@ -1447,7 +1446,7 @@ IMPL_LINK(SwTOXSelectTabPage, MenuExecuteHdl, Menu*, pMenu)
}
boost::scoped_ptr<SwAutoMarkDlg_Impl> pAutoMarkDlg(new SwAutoMarkDlg_Impl(
- m_pAutoMarkPB, sAutoMarkURL, sAutoMarkType, bNew ));
+ m_pAutoMarkPB, sAutoMarkURL, bNew ));
if( RET_OK != pAutoMarkDlg->Execute() && bNew )
sAutoMarkURL = sSaveAutoMarkURL;
@@ -4012,11 +4011,10 @@ bool SwEntryBrowseBox::IsModified()const
}
SwAutoMarkDlg_Impl::SwAutoMarkDlg_Impl(vcl::Window* pParent, const OUString& rAutoMarkURL,
- const OUString& rAutoMarkType, bool bCreate)
+ bool bCreate)
: ModalDialog(pParent, "CreateAutomarkDialog",
"modules/swriter/ui/createautomarkdialog.ui")
, sAutoMarkURL(rAutoMarkURL)
- , sAutoMarkType(rAutoMarkType)
, bCreateMode(bCreate)
{
get(m_pOKPB, "ok");
diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx
index 2d609bd46bbe..21d057391644 100644
--- a/sw/source/uibase/inc/frmpage.hxx
+++ b/sw/source/uibase/inc/frmpage.hxx
@@ -106,7 +106,6 @@ class SwFrmPage: public SfxTabPage
sal_uInt16 nHtmlMode;
OString sDlgType;
Size aGrfSize;
- Size aWrap;
SwTwips nUpperBorder;
SwTwips nLowerBorder;
double fWidthHeightRatio; //width-to-height ratio to support the KeepRatio button