summaryrefslogtreecommitdiff
path: root/xmloff/inc
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 /xmloff/inc
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 'xmloff/inc')
-rw-r--r--xmloff/inc/XMLTextColumnsContext.hxx1
-rw-r--r--xmloff/inc/txtflde.hxx6
-rw-r--r--xmloff/inc/txtfldi.hxx6
-rw-r--r--xmloff/inc/txtvfldi.hxx10
4 files changed, 0 insertions, 23 deletions
diff --git a/xmloff/inc/XMLTextColumnsContext.hxx b/xmloff/inc/XMLTextColumnsContext.hxx
index 1677eea960d8..9a10ac67a00e 100644
--- a/xmloff/inc/XMLTextColumnsContext.hxx
+++ b/xmloff/inc/XMLTextColumnsContext.hxx
@@ -35,7 +35,6 @@ class XMLTextColumnsContext :public XMLElementPropertyContext
const OUString sSeparatorLineColor;
const OUString sSeparatorLineRelativeHeight;
const OUString sSeparatorLineVerticalAlignment;
- const OUString sIsAutomatic;
const OUString sAutomaticDistance;
const OUString sSeparatorLineStyle;
diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
index 7dc0a1b8dde0..50614776caa6 100644
--- a/xmloff/inc/txtflde.hxx
+++ b/xmloff/inc/txtflde.hxx
@@ -462,7 +462,6 @@ private:
const OUString sPropertyDataColumnName;
const OUString sPropertyDataCommandType;
const OUString sPropertyDataTableName;
- const OUString sPropertyDate;
const OUString sPropertyDateTime;
const OUString sPropertyDateTimeValue;
const OUString sPropertyDDECommandElement;
@@ -490,7 +489,6 @@ private:
const OUString sPropertyIsVisible;
const OUString sPropertyItems;
const OUString sPropertyLevel;
- const OUString sPropertyMacro;
const OUString sPropertyMeasureKind;
const OUString sPropertyName;
const OUString sPropertyNumberFormat;
@@ -498,12 +496,9 @@ private:
const OUString sPropertyNumberingType;
const OUString sPropertyOffset;
const OUString sPropertyOn;
- const OUString sPropertyPlaceholder;
const OUString sPropertyPlaceholderType;
const OUString sPropertyReferenceFieldPart;
const OUString sPropertyReferenceFieldSource;
- const OUString sPropertyReferenceFieldType;
- const OUString sPropertyRevision;
const OUString sPropertyScriptType;
const OUString sPropertySelectedItem;
const OUString sPropertySequenceNumber;
@@ -518,7 +513,6 @@ private:
const OUString sPropertyUserText;
const OUString sPropertyValue;
const OUString sPropertyVariableName;
- const OUString sPropertyVariableSubType;
const OUString sPropertyHelp;
const OUString sPropertyTooltip;
const OUString sPropertyTextRange;
diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 66c2a1d25344..4023aacf2c93 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -110,8 +110,6 @@ enum XMLTextFieldAttrTokens
/// abstract class for text field import
class XMLTextFieldImportContext : public SvXMLImportContext
{
- const OUString sIsFixed;
-
// data members
OUStringBuffer sContentBuffer; /// collect character data
OUString sContent; /// character data after collection
@@ -191,7 +189,6 @@ class XMLSenderFieldImportContext : public XMLTextFieldImportContext
sal_Int16 nSubType; /// API subtype for ExtUser field
- const OUString sEmpty; /// empty string
const OUString sPropertyFixed;
const OUString sPropertyFieldSubType;
const OUString sPropertyContent;
@@ -260,8 +257,6 @@ protected:
class XMLPlaceholderFieldImportContext : public XMLTextFieldImportContext
{
- const OUString sEmpty; /// empty string
- const OUString sServiceJumpEdit;
const OUString sPropertyPlaceholderType;
const OUString sPropertyPlaceholder;
const OUString sPropertyHint;
@@ -966,7 +961,6 @@ class XMLMacroFieldImportContext : public XMLTextFieldImportContext
const OUString sPropertyHint;
const OUString sPropertyMacroName;
const OUString sPropertyScriptURL;
- const OUString sPropertyLibraryName;
OUString sDescription;
SvXMLImportContextRef xEventContext;
diff --git a/xmloff/inc/txtvfldi.hxx b/xmloff/inc/txtvfldi.hxx
index c3bf5d14eb2f..c58f5f49846c 100644
--- a/xmloff/inc/txtvfldi.hxx
+++ b/xmloff/inc/txtvfldi.hxx
@@ -48,7 +48,6 @@ class XMLValueImportHelper
const OUString sPropertyContent;
const OUString sPropertyValue;
- const OUString sPropertyFormula;
const OUString sPropertyNumberFormat;
const OUString sPropertyIsFixedLanguage;
@@ -217,8 +216,6 @@ protected:
/** import variable get fields (<text:variable-get>) */
class XMLVariableGetFieldImportContext : public XMLVarFieldImportContext
{
- const OUString sPropertySubType;
-
public:
TYPEINFO_OVERRIDE();
@@ -423,10 +420,8 @@ public:
/** sequence fields (<text:sequence>) */
class XMLSequenceFieldImportContext : public XMLSetVarFieldImportContext
{
- const OUString sPropertyFormula;
const OUString sPropertyNumberFormat;
const OUString sPropertySequenceValue;
- OUString sFormula;
OUString sNumFormat;
OUString sNumFormatSync;
OUString sRefName;
@@ -493,7 +488,6 @@ public:
*/
class XMLVariableDeclImportContext : public SvXMLImportContext
{
- const OUString sPropertyName;
const OUString sPropertySubType;
const OUString sPropertyNumberingLevel;
const OUString sPropertyNumberingSeparator;
@@ -531,15 +525,11 @@ public:
/** import table formula fields (deprecated; for Writer 2.0 compatibility) */
class XMLTableFormulaImportContext : public XMLTextFieldImportContext
{
- const OUString sPropertyNumberFormat;
- const OUString sPropertyContent;
const OUString sPropertyIsShowFormula;
const OUString sPropertyCurrentPresentation;
XMLValueImportHelper aValueHelper;
- OUString sFormula;
-
bool bIsShowFormula;
public: