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 /sd | |
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 'sd')
-rw-r--r-- | sd/source/filter/html/htmlex.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/html/htmlex.hxx | 2 | ||||
-rw-r--r-- | sd/source/filter/html/sdhtmlfilter.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/table/TableDesignPane.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/table/TableDesignPane.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 1 |
11 files changed, 1 insertions, 17 deletions
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 389ca500571d..897f26851024 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -345,11 +345,9 @@ void lclAppendStyle(OUStringBuffer& aBuffer, const OUString& aTag, const OUStrin HtmlExport::HtmlExport( const OUString& aPath, const Sequence< PropertyValue >& rParams, - const OUString& rFilterOptions, SdDrawDocument* pExpDoc, sd::DrawDocShell* pDocShell ) : maPath( aPath ), - maFilterOptions( rFilterOptions ), mpDoc(pExpDoc), mpDocSh( pDocShell ), meEC(NULL), diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx index e5e18c086dea..bb633fbade2a 100644 --- a/sd/source/filter/html/htmlex.hxx +++ b/sd/source/filter/html/htmlex.hxx @@ -85,7 +85,6 @@ class HtmlExport std::vector< SdPage* > maNotesPages; OUString maPath; - OUString maFilterOptions; SdDrawDocument* mpDoc; ::sd::DrawDocShell* mpDocSh; @@ -230,7 +229,6 @@ class HtmlExport public: HtmlExport(const OUString& aPath, const css::uno::Sequence<css::beans::PropertyValue>& rParams, - const OUString& rFilterOptions, SdDrawDocument* pExpDoc, sd::DrawDocShell* pDocShell); diff --git a/sd/source/filter/html/sdhtmlfilter.cxx b/sd/source/filter/html/sdhtmlfilter.cxx index 524362204768..aab3d6341fea 100644 --- a/sd/source/filter/html/sdhtmlfilter.cxx +++ b/sd/source/filter/html/sdhtmlfilter.cxx @@ -57,17 +57,13 @@ bool SdHTMLFilter::Export() SfxItemSet *pSet = mrMedium.GetItemSet(); ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aParams; - OUString sFilterOptions; const SfxPoolItem* pItem; if ( pSet->GetItemState( SID_FILTER_DATA, false, &pItem ) == SfxItemState::SET ) ((SfxUnoAnyItem*)pItem)->GetValue() >>= aParams; - if (pSet->GetItemState(SID_FILE_FILTEROPTIONS, true, &pItem) == SfxItemState::SET) - sFilterOptions = ((SfxStringItem*)pItem)->GetValue(); - - HtmlExport aExport(mrMedium.GetName(), aParams, sFilterOptions, &mrDocument, &mrDocShell); + HtmlExport aExport(mrMedium.GetName(), aParams, &mrDocument, &mrDocShell); return true; } diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx index 0420b378d773..8c12d481e288 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx @@ -71,7 +71,6 @@ SelectionManager::SelectionManager (SlideSorter& rSlideSorter) mbIsMakeSelectionVisiblePending(true), mnInsertionPosition(-1), mnAnimationId(Animator::NotAnAnimationId), - maRequestedTopLeft(), mpPageInsertionListener(), mpSelectionObserver(new SelectionObserver(rSlideSorter)) { diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx index c9288c0021ad..2af4e0334cbf 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx @@ -57,7 +57,6 @@ void SelectionObserver::Context::Abort(void) SelectionObserver::SelectionObserver (SlideSorter& rSlideSorter) : mrSlideSorter(rSlideSorter), - mpDocument(mrSlideSorter.GetModel().GetDocument()), mbIsOvservationActive(false), maInsertedPages(), maDeletedPages() diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx index e546b205519e..5d5f235fa63e 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx @@ -132,7 +132,6 @@ private: and left of the visible area to maRequestedTopLeft. */ Animator::AnimationId mnAnimationId; - Point maRequestedTopLeft; class PageInsertionListener; ::boost::scoped_ptr<PageInsertionListener> mpPageInsertionListener; diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx index 8c01b4737dad..30079a495cbd 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx @@ -65,7 +65,6 @@ public: private: SlideSorter& mrSlideSorter; - SdDrawDocument* mpDocument; bool mbIsOvservationActive; ::std::vector<const SdPage*> maInsertedPages; diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx index 054dbbdbb668..de7d76f5fb9e 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx @@ -84,7 +84,6 @@ private: Bitmap maMouseOverFocusedBackground; Bitmap maMouseOverSelectedBackground; Bitmap maMouseOverSelectedAndFocusedBackground; - Size maSize; void PaintBackground ( PageObjectLayouter *pPageObjectLayouter, diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 629556dfbb68..5be0d543cdd1 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -91,7 +91,6 @@ static const OUString* getPropertyNames() TableDesignWidget::TableDesignWidget( VclBuilderContainer* pParent, ViewShellBase& rBase, bool bModal ) : mrBase(rBase) - , msTableTemplate("TableTemplate") , mbModal(bModal) , mbStyleSelected(false) , mbOptionsChanged(false) diff --git a/sd/source/ui/table/TableDesignPane.hxx b/sd/source/ui/table/TableDesignPane.hxx index 7175a7bcf857..0fb256cc103c 100644 --- a/sd/source/ui/table/TableDesignPane.hxx +++ b/sd/source/ui/table/TableDesignPane.hxx @@ -91,7 +91,6 @@ private: private: ViewShellBase& mrBase; - const OUString msTableTemplate; TableValueSet* m_pValueSet; CheckBox* m_aCheckBoxes[CB_COUNT]; diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 5af3c448ed7d..1da275481f44 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -353,7 +353,6 @@ namespace { } private: - Any maDialog; ::std::vector<beans::PropertyValue> maProperties; ::std::vector<sal_Int32> maSlidesPerPage; bool mbImpress; |