diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-10-15 15:58:56 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-10-15 15:58:56 +0200 |
commit | ad9498f8b888f7851a8612b8d654a2bc89005925 (patch) | |
tree | ff7e98ce301121fdddf44f2fc8cb42bd2b1fac4f /xmloff/source/text | |
parent | eea16cb3e65a4308caddb7618d31a76ca259dbb1 (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 'xmloff/source/text')
-rw-r--r-- | xmloff/source/text/XMLAutoTextEventExport.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/text/XMLAutoTextEventExport.hxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/XMLChangedRegionImportContext.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexTOCContext.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexTOCContext.hxx | 1 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexTOCSourceContext.hxx | 1 | ||||
-rw-r--r-- | xmloff/source/text/XMLRedlineExport.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/text/XMLRedlineExport.hxx | 3 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionExport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionExport.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextColumnsContext.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextFrameContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextMasterPageContext.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/text/txtflde.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/text/txtfldi.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/text/txtparai.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/text/txtvfldi.cxx | 5 |
17 files changed, 1 insertions, 40 deletions
diff --git a/xmloff/source/text/XMLAutoTextEventExport.cxx b/xmloff/source/text/XMLAutoTextEventExport.cxx index fd04f3eab92e..19ee4a6642d6 100644 --- a/xmloff/source/text/XMLAutoTextEventExport.cxx +++ b/xmloff/source/text/XMLAutoTextEventExport.cxx @@ -64,9 +64,6 @@ XMLAutoTextEventExport::XMLAutoTextEventExport( OUString const & implementationName, sal_uInt16 nFlags ) : SvXMLExport(util::MeasureUnit::INCH, xContext, implementationName, XML_AUTO_TEXT, nFlags) -, - sEventType("EventType"), - sNone("None") { } diff --git a/xmloff/source/text/XMLAutoTextEventExport.hxx b/xmloff/source/text/XMLAutoTextEventExport.hxx index ec8eadfdfb09..39cc9a103133 100644 --- a/xmloff/source/text/XMLAutoTextEventExport.hxx +++ b/xmloff/source/text/XMLAutoTextEventExport.hxx @@ -49,10 +49,6 @@ class XMLAutoTextEventExport : public SvXMLExport ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> xEvents; - const OUString sEventType; - const OUString sNone; - - public: XMLAutoTextEventExport( diff --git a/xmloff/source/text/XMLChangedRegionImportContext.hxx b/xmloff/source/text/XMLChangedRegionImportContext.hxx index 772720375c79..96d61eced7ac 100644 --- a/xmloff/source/text/XMLChangedRegionImportContext.hxx +++ b/xmloff/source/text/XMLChangedRegionImportContext.hxx @@ -40,8 +40,6 @@ namespace com { namespace sun { namespace star { */ class XMLChangedRegionImportContext : public SvXMLImportContext { - const OUString sEmpty; - /// if we replace the current XTextCursor/XText by the ones for /// the redline, we remember the old cursor here. ::com::sun::star::uno::Reference< diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index e674dacaec41..a25b23f4ef89 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.cxx @@ -97,7 +97,6 @@ SvXMLEnumMapEntry const aIndexTypeMap[] = XMLIndexTOCContext::XMLIndexTOCContext(SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName) : SvXMLImportContext(rImport, nPrfx, rLocalName) - , sTitle("Title") , sIsProtected("IsProtected") , sName("Name") , eIndexType(TEXT_INDEX_UNKNOWN) diff --git a/xmloff/source/text/XMLIndexTOCContext.hxx b/xmloff/source/text/XMLIndexTOCContext.hxx index ad84618654dd..509d87536461 100644 --- a/xmloff/source/text/XMLIndexTOCContext.hxx +++ b/xmloff/source/text/XMLIndexTOCContext.hxx @@ -54,7 +54,6 @@ enum IndexTypeEnum */ class XMLIndexTOCContext : public SvXMLImportContext { - const OUString sTitle; const OUString sIsProtected; const OUString sName; diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.hxx b/xmloff/source/text/XMLIndexTOCSourceContext.hxx index ab442f6025f0..e6a79b6d4f03 100644 --- a/xmloff/source/text/XMLIndexTOCSourceContext.hxx +++ b/xmloff/source/text/XMLIndexTOCSourceContext.hxx @@ -37,7 +37,6 @@ class XMLIndexTOCSourceContext : public XMLIndexSourceBaseContext { const OUString sCreateFromMarks; const OUString sLevel; - const OUString sCreateFromChapter; const OUString sCreateFromOutline; const OUString sCreateFromLevelParagraphStyles; diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx index b220edfdcd47..5aabd59fb25b 100644 --- a/xmloff/source/text/XMLRedlineExport.cxx +++ b/xmloff/source/text/XMLRedlineExport.cxx @@ -73,14 +73,11 @@ XMLRedlineExport::XMLRedlineExport(SvXMLExport& rExp) , sRedlineSuccessorData("RedlineSuccessorData") , sRedlineText("RedlineText") , sRedlineType("RedlineType") -, sStyle("Style") -, sTextTable("TextTable") , sUnknownChange("UnknownChange") , sStartRedline("StartRedline") , sEndRedline("EndRedline") , sRedlineIdentifier("RedlineIdentifier") , sIsInHeaderFooter("IsInHeaderFooter") -, sRedlineProtectionKey("RedlineProtectionKey") , sRecordChanges("RecordChanges") , sMergeLastPara("MergeLastPara") , sChangePrefix("ct") diff --git a/xmloff/source/text/XMLRedlineExport.hxx b/xmloff/source/text/XMLRedlineExport.hxx index c62098a10b45..f0a43958fe65 100644 --- a/xmloff/source/text/XMLRedlineExport.hxx +++ b/xmloff/source/text/XMLRedlineExport.hxx @@ -67,14 +67,11 @@ class XMLRedlineExport const OUString sRedlineSuccessorData; const OUString sRedlineText; const OUString sRedlineType; - const OUString sStyle; - const OUString sTextTable; const OUString sUnknownChange; const OUString sStartRedline; const OUString sEndRedline; const OUString sRedlineIdentifier; const OUString sIsInHeaderFooter; - const OUString sRedlineProtectionKey; const OUString sRecordChanges; const OUString sMergeLastPara; diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index fb5ee6f9003d..67f5308ec10b 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -88,7 +88,6 @@ XMLSectionExport::XMLSectionExport( , sCreateFromStarCalc("CreateFromStarCalc") , sCreateFromStarChart("CreateFromStarChart") , sCreateFromStarDraw("CreateFromStarDraw") -, sCreateFromStarImage("CreateFromStarImage") , sCreateFromStarMath("CreateFromStarMath") , sCreateFromTables("CreateFromTables") , sCreateFromTextFrames("CreateFromTextFrames") @@ -107,7 +106,6 @@ XMLSectionExport::XMLSectionExport( , sLinkRegion("LinkRegion") , sMainEntryCharacterStyleName("MainEntryCharacterStyleName") , sParaStyleHeading("ParaStyleHeading") -, sParaStyleLevel("ParaStyleLevel") , sTitle("Title") , sName("Name") , sUseAlphabeticalSeparators("UseAlphabeticalSeparators") diff --git a/xmloff/source/text/XMLSectionExport.hxx b/xmloff/source/text/XMLSectionExport.hxx index 9b4a765b139e..26a0868a71fe 100644 --- a/xmloff/source/text/XMLSectionExport.hxx +++ b/xmloff/source/text/XMLSectionExport.hxx @@ -85,7 +85,6 @@ class XMLSectionExport const OUString sCreateFromStarCalc; const OUString sCreateFromStarChart; const OUString sCreateFromStarDraw; - const OUString sCreateFromStarImage; const OUString sCreateFromStarMath; const OUString sCreateFromTables; const OUString sCreateFromTextFrames; @@ -104,7 +103,6 @@ class XMLSectionExport const OUString sLinkRegion; const OUString sMainEntryCharacterStyleName; const OUString sParaStyleHeading; - const OUString sParaStyleLevel; const OUString sTitle; const OUString sName; const OUString sUseAlphabeticalSeparators; diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx index 986b84f71119..a000fc663cc9 100644 --- a/xmloff/source/text/XMLTextColumnsContext.cxx +++ b/xmloff/source/text/XMLTextColumnsContext.cxx @@ -278,7 +278,6 @@ XMLTextColumnsContext::XMLTextColumnsContext( , sSeparatorLineColor("SeparatorLineColor") , sSeparatorLineRelativeHeight("SeparatorLineRelativeHeight") , sSeparatorLineVerticalAlignment("SeparatorLineVerticalAlignment") -, sIsAutomatic("IsAutomatic") , sAutomaticDistance("AutomaticDistance") , sSeparatorLineStyle("SeparatorLineStyle") , pColumns( 0 ) diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 166813287f0c..f7ccbea71178 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -375,7 +375,6 @@ class XMLTextFrameContext_Impl : public SvXMLImportContext const OUString sHoriOrientPosition; const OUString sVertOrient; const OUString sVertOrientPosition; - const OUString sChainNextName; const OUString sAnchorType; const OUString sAnchorPageNo; const OUString sGraphicURL; @@ -863,7 +862,6 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( , sHoriOrientPosition("HoriOrientPosition") , sVertOrient("VertOrient") , sVertOrientPosition("VertOrientPosition") -, sChainNextName("ChainNextName") , sAnchorType("AnchorType") , sAnchorPageNo("AnchorPageNo") , sGraphicURL("GraphicURL") diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx index 28d0faf2b14f..83fd57d82342 100644 --- a/xmloff/source/text/XMLTextMasterPageContext.cxx +++ b/xmloff/source/text/XMLTextMasterPageContext.cxx @@ -65,7 +65,6 @@ XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport, bool bOverwrite ) : SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList, XML_STYLE_FAMILY_MASTER_PAGE ) , sIsPhysical( "IsPhysical" ) -, sPageStyleLayout( "PageStyleLayout" ) , sFollowStyle( "FollowStyle" ) , bInsertHeader( false ) , bInsertFooter( false ) diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 36341bd01bc5..13072a5bf9e9 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -291,7 +291,6 @@ XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp, sPropertyDataColumnName("DataColumnName"), sPropertyDataCommandType("DataCommandType"), sPropertyDataTableName("DataTableName"), - sPropertyDate("Date"), sPropertyDateTime("DateTime"), sPropertyDateTimeValue("DateTimeValue"), sPropertyDDECommandElement("DDECommandElement"), @@ -319,7 +318,6 @@ XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp, sPropertyIsVisible("IsVisible"), sPropertyItems("Items"), sPropertyLevel("Level"), - sPropertyMacro("Macro"), sPropertyMeasureKind("Kind"), sPropertyName("Name"), sPropertyNumberFormat("NumberFormat"), @@ -327,12 +325,9 @@ XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp, sPropertyNumberingType("NumberingType"), sPropertyOffset("Offset"), sPropertyOn("On"), - sPropertyPlaceholder("PlaceHolder"), sPropertyPlaceholderType("PlaceHolderType"), sPropertyReferenceFieldPart("ReferenceFieldPart"), sPropertyReferenceFieldSource("ReferenceFieldSource"), - sPropertyReferenceFieldType("ReferenceFieldType"), - sPropertyRevision("Revision"), sPropertyScriptType("ScriptType"), sPropertySelectedItem("SelectedItem"), sPropertySequenceNumber("SequenceNumber"), @@ -347,7 +342,6 @@ XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp, sPropertyUserText("UserText"), sPropertyValue("Value"), sPropertyVariableName("VariableName"), - sPropertyVariableSubType("VariableSubtype"), sPropertyHelp("Help"), sPropertyTooltip("Tooltip"), sPropertyTextRange("TextRange"), diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 913613591016..fd40768c751a 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -198,7 +198,6 @@ XMLTextFieldImportContext::XMLTextFieldImportContext( const sal_Char* pService, sal_uInt16 nPrefix, const OUString& rElementName) : SvXMLImportContext( rImport, nPrefix, rElementName ) -, sIsFixed(sAPI_is_fixed) , rTextImportHelper(rHlp) , sServicePrefix(sAPI_textfield_prefix) , bValid(false) diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index 3aefc7827e68..36fb946ab91d 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -270,8 +270,6 @@ XMLEndReferenceContext_Impl::XMLEndReferenceContext_Impl( class XMLImpSpanContext_Impl : public SvXMLImportContext { - const OUString sTextFrame; - XMLHints_Impl& rHints; XMLStyleHint_Impl *pHint; @@ -1519,7 +1517,6 @@ XMLImpSpanContext_Impl::XMLImpSpanContext_Impl( sal_uInt8 nSFConvFlags ) : SvXMLImportContext( rImport, nPrfx, rLName ) -, sTextFrame("TextFrame") , rHints( rHnts ) , pHint( 0 ) , rIgnoreLeadingSpace( rIgnLeadSpace ) diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx index 146a4125c313..de425ff9a7ae 100644 --- a/xmloff/source/text/txtvfldi.cxx +++ b/xmloff/source/text/txtvfldi.cxx @@ -596,8 +596,7 @@ XMLVariableGetFieldImportContext::XMLVariableGetFieldImportContext( false, false, false, false, true, true, true, false, - true), - sPropertySubType(sAPI_sub_type) + true) { } @@ -702,7 +701,6 @@ XMLTableFormulaImportContext::XMLTableFormulaImportContext( sPropertyCurrentPresentation( "CurrentPresentation"), aValueHelper(rImport, rHlp, false, true, false, true), - sFormula(), bIsShowFormula(false) { } @@ -835,7 +833,6 @@ XMLVariableDeclImportContext::XMLVariableDeclImportContext( enum VarType eVarType) : SvXMLImportContext(rImport, nPrfx, rLocalName), // bug?? which properties for userfield/userfieldmaster - sPropertyName(sAPI_name), sPropertySubType(sAPI_sub_type), sPropertyNumberingLevel(sAPI_chapter_numbering_level), sPropertyNumberingSeparator(sAPI_numbering_separator), |