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 /cui | |
parent | Resolves: #i63015# always default to WinAnsiEncoding... (diff) | |
download | core-ad9498f8b888f7851a8612b8d654a2bc89005925.tar.gz core-ad9498f8b888f7851a8612b8d654a2bc89005925.zip |
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 'cui')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 1 | ||||
-rw-r--r-- | cui/source/dialogs/colorpicker.cxx | 2 | ||||
-rw-r--r-- | cui/source/inc/about.hxx | 1 | ||||
-rw-r--r-- | cui/source/inc/autocdlg.hxx | 5 | ||||
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 1 | ||||
-rw-r--r-- | cui/source/inc/optlingu.hxx | 1 | ||||
-rw-r--r-- | cui/source/inc/page.hxx | 1 | ||||
-rw-r--r-- | cui/source/tabpages/tpcolor.cxx | 1 |
8 files changed, 0 insertions, 13 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index a8a87d28f96e..0254f1df6163 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -99,7 +99,6 @@ class SpellUndoAction_Impl : public SfxUndoAction long m_nOldErrorStart; long m_nOldErrorEnd; bool m_bIsErrorLanguageSelected; - OUString m_sRuleId; //undo of AddToDictionary Reference<XDictionary> m_xDictionary; OUString m_sAddedWord; diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 3b31d409499f..f52e724f6cdf 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -970,7 +970,6 @@ public: void setColorComponent( sal_uInt16 nComp, double dValue ); private: - Color maPreviousColor; sal_Int16 mnDialogMode; ColorMode meMode; @@ -1012,7 +1011,6 @@ private: ColorPickerDialog::ColorPickerDialog( vcl::Window* pParent, sal_Int32 nColor, sal_Int16 nMode ) : ModalDialog( pParent, "ColorPicker", "cui/ui/colorpickerdialog.ui" ) -, maPreviousColor( nColor ) , mnDialogMode( nMode ) , meMode( DefaultMode ) , maSliderImage( FixedImage::loadThemeImage("res/colorslider.png") ) diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx index 72c45c2bc728..60f265742410 100644 --- a/cui/source/inc/about.hxx +++ b/cui/source/inc/about.hxx @@ -42,7 +42,6 @@ private: PushButton* m_pCreditsButton; PushButton* m_pWebsiteButton; - OUString aVersionData; OUString m_aVersionTextStr; OUString m_aVendorTextStr; OUString m_aCopyrightTextStr; diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx index 2ca4b4c440c7..5fcf733079b3 100644 --- a/cui/source/inc/autocdlg.hxx +++ b/cui/source/inc/autocdlg.hxx @@ -103,8 +103,6 @@ private: OUString m_sURL; OUString m_sNoDblSpaces; OUString m_sDash; - OUString m_sNonBrkSpace; - OUString m_sFirst; OUString m_sAccidentalCaps; public: @@ -134,14 +132,11 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage OUString sCptlSttSent; OUString sUserStyle; OUString sBullet; - OUString sByInputBullet; OUString sBoldUnder; OUString sNoDblSpaces; OUString sCorrectCapsLock; OUString sDetectURL; OUString sDash; - OUString sNonBrkSpace; - OUString sOrdinal; OUString sRightMargin; OUString sNum; OUString sBorder; diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 5bfbe3cc0044..20d4ed284e78 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -640,7 +640,6 @@ class SvxColorTabPage : public SfxTabPage private: XPropertyListType meType; - XOutdevItemPool* mpXPool; Window *mpTopDlg; CheckBox *m_pBoxEmbed; diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx index 0a914642a354..2856fec3f1b0 100644 --- a/cui/source/inc/optlingu.hxx +++ b/cui/source/inc/optlingu.hxx @@ -107,7 +107,6 @@ private: OUString sCapitalWords; OUString sWordsWithDigits; - OUString sCapitalization; OUString sSpellSpecial; OUString sSpellAuto; OUString sGrammarAuto; diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx index d95220e13a15..2009188c0ea3 100644 --- a/cui/source/inc/page.hxx +++ b/cui/source/inc/page.hxx @@ -131,7 +131,6 @@ private: long nLastTopMargin; long nLastBottomMargin; - Size aMaxSize; bool bLandscape; bool bBorderModified; SvxModeType eMode; diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 58e8a1c87d20..0040b684297b 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -303,7 +303,6 @@ struct SvxColorTabPageShadow SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs) : SfxTabPage(pParent, "ColorPage", "cui/ui/colorpage.ui", &rInAttrs) , meType( XCOLOR_LIST ) - , mpXPool( (XOutdevItemPool*) rInAttrs.GetPool() ) , mpTopDlg( GetParentDialog() ) , pShadow ( new SvxColorTabPageShadow() ) , rOutAttrs ( rInAttrs ) |