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 /framework | |
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 'framework')
10 files changed, 4 insertions, 30 deletions
diff --git a/framework/inc/classes/fwktabwindow.hxx b/framework/inc/classes/fwktabwindow.hxx index d727db4231ec..ebbac7fc80bb 100644 --- a/framework/inc/classes/fwktabwindow.hxx +++ b/framework/inc/classes/fwktabwindow.hxx @@ -53,7 +53,6 @@ class FwkTabPage : public TabPage { private: OUString m_sPageURL; - OUString m_sEventHdl; css::uno::Reference< css::awt::XWindow > m_xPage; css::uno::Reference< css::awt::XContainerWindowEventHandler > m_xEventHdl; css::uno::Reference< css::awt::XContainerWindowProvider > m_xWinProvider; diff --git a/framework/inc/dispatch/startmoduledispatcher.hxx b/framework/inc/dispatch/startmoduledispatcher.hxx index beee6407b967..979f79491234 100644 --- a/framework/inc/dispatch/startmoduledispatcher.hxx +++ b/framework/inc/dispatch/startmoduledispatcher.hxx @@ -62,9 +62,6 @@ class StartModuleDispatcher : public ::cppu::WeakImplHelper2< /** @short our "context" frame. */ css::uno::WeakReference< css::frame::XFrame > m_xOwner; - /** @short the original queryDispatch() target. */ - OUString m_sDispatchTarget; - /** @short list of registered status listener */ osl::Mutex m_mutex; ListenerHash m_lStatusListener; @@ -83,13 +80,9 @@ class StartModuleDispatcher : public ::cppu::WeakImplHelper2< @param xFrame the frame where the corresponding dispatch was started. - - @param sTarget - the original target information used for the related queryDispatch() call. */ StartModuleDispatcher(const css::uno::Reference< css::uno::XComponentContext >& rxContext, - const css::uno::Reference< css::frame::XFrame >& xFrame , - const OUString& sTarget); + const css::uno::Reference< css::frame::XFrame >& xFrame); /** @short does nothing real. */ virtual ~StartModuleDispatcher(); diff --git a/framework/inc/xml/menudocumenthandler.hxx b/framework/inc/xml/menudocumenthandler.hxx index c5af17c81a90..2462bb2e9336 100644 --- a/framework/inc/xml/menudocumenthandler.hxx +++ b/framework/inc/xml/menudocumenthandler.hxx @@ -93,7 +93,6 @@ class FWE_DLLPUBLIC ReadMenuDocumentHandlerBase : OUString m_aHelpURL; OUString m_aCommandURL; OUString m_aStyle; - ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > m_aItemProp; }; class FWE_DLLPUBLIC OReadMenuDocumentHandler : public ReadMenuDocumentHandlerBase diff --git a/framework/source/accelerators/globalacceleratorconfiguration.cxx b/framework/source/accelerators/globalacceleratorconfiguration.cxx index 031d98c666f9..cdf60571d132 100644 --- a/framework/source/accelerators/globalacceleratorconfiguration.cxx +++ b/framework/source/accelerators/globalacceleratorconfiguration.cxx @@ -84,8 +84,6 @@ public: private: - OUString m_sLocale; - /** helper to listen for configuration changes without ownership cycle problems */ css::uno::Reference< css::util::XChangesListener > m_xCfgListener; }; diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx index e46d6fb2c47d..c1b8da31ad9b 100644 --- a/framework/source/dispatch/dispatchprovider.cxx +++ b/framework/source/dispatch/dispatchprovider.cxx @@ -594,7 +594,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat case E_STARTMODULEDISPATCHER : { - StartModuleDispatcher* pDispatcher = new StartModuleDispatcher( m_xContext, xOwner, sTarget ); + StartModuleDispatcher* pDispatcher = new StartModuleDispatcher( m_xContext, xOwner ); xDispatchHelper = css::uno::Reference< css::frame::XDispatch >( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY ); } break; diff --git a/framework/source/dispatch/startmoduledispatcher.cxx b/framework/source/dispatch/startmoduledispatcher.cxx index ae876426dc91..e0e17189409a 100644 --- a/framework/source/dispatch/startmoduledispatcher.cxx +++ b/framework/source/dispatch/startmoduledispatcher.cxx @@ -49,11 +49,9 @@ namespace framework{ namespace fpf = ::framework::pattern::frame; StartModuleDispatcher::StartModuleDispatcher(const css::uno::Reference< css::uno::XComponentContext >& rxContext, - const css::uno::Reference< css::frame::XFrame >& xFrame , - const OUString& sTarget) + const css::uno::Reference< css::frame::XFrame >& xFrame) : m_xContext (rxContext ) , m_xOwner (xFrame ) - , m_sDispatchTarget (sTarget ) , m_lStatusListener (m_mutex) { } diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index 550112c0af6e..975a25642b04 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -76,7 +76,6 @@ using namespace ::com::sun::star; #define PROPERTYNAME_IMAGEBIGHC_URL OUString("ImageBigHCURL" ) #define IMAGES_NODENAME OUString("UserDefinedImages" ) -#define PRIVATE_IMAGE_URL OUString("private:image/" ) #define PROPERTYNAME_MERGEMENU_MERGEPOINT OUString("MergePoint" ) #define PROPERTYNAME_MERGEMENU_MERGECOMMAND OUString("MergeCommand" ) @@ -335,9 +334,7 @@ class AddonsOptions_Impl : public ConfigItem OUString m_aPropMergeStatusbarNames[PROPERTYCOUNT_MERGE_STATUSBAR]; OUString m_aEmpty; OUString m_aPathDelimiter; - OUString m_aSeparator; OUString m_aRootAddonPopupMenuURLPrexfix; - OUString m_aPrivateImageURL; Sequence< Sequence< PropertyValue > > m_aCachedMenuProperties; Sequence< Sequence< PropertyValue > > m_aCachedMenuBarPartProperties; AddonToolBars m_aCachedToolBarPartProperties; @@ -366,9 +363,7 @@ AddonsOptions_Impl::AddonsOptions_Impl() : ConfigItem( ROOTNODE_ADDONMENU ), m_nRootAddonPopupMenuId( 0 ), m_aPathDelimiter( PATHDELIMITER ), - m_aSeparator( SEPARATOR_URL ), - m_aRootAddonPopupMenuURLPrexfix( ADDONSPOPUPMENU_URL_PREFIX ), - m_aPrivateImageURL( PRIVATE_IMAGE_URL ) + m_aRootAddonPopupMenuURLPrexfix( ADDONSPOPUPMENU_URL_PREFIX ) { // initialize array with fixed property names m_aPropNames[ INDEX_URL ] = PROPERTYNAME_URL; diff --git a/framework/source/services/tabwindowservice.cxx b/framework/source/services/tabwindowservice.cxx index 5f761a487f0e..0fed8118b013 100644 --- a/framework/source/services/tabwindowservice.cxx +++ b/framework/source/services/tabwindowservice.cxx @@ -172,9 +172,6 @@ private: /// index of the current active page ::sal_Int32 m_nCurrentPageIndex; - - /// title of the tabcontrolled window - OUString m_sTitle; }; DEFINE_XINTERFACE_6 ( TabWindowService , diff --git a/framework/source/uiconfiguration/globalsettings.cxx b/framework/source/uiconfiguration/globalsettings.cxx index 56fab671f31f..6ce481159321 100644 --- a/framework/source/uiconfiguration/globalsettings.cxx +++ b/framework/source/uiconfiguration/globalsettings.cxx @@ -77,7 +77,6 @@ class GlobalSettings_Access : public ::cppu::WeakImplHelper2< osl::Mutex m_mutex; bool m_bDisposed : 1, m_bConfigRead : 1; - OUString m_aConfigSettingsAccess; OUString m_aNodeRefStates; OUString m_aPropStatesEnabled; OUString m_aPropLocked; @@ -89,7 +88,6 @@ class GlobalSettings_Access : public ::cppu::WeakImplHelper2< GlobalSettings_Access::GlobalSettings_Access( const css::uno::Reference< css::uno::XComponentContext >& rxContext ) : m_bDisposed( false ), m_bConfigRead( false ), - m_aConfigSettingsAccess( GLOBALSETTINGS_ROOT_ACCESS ), m_aNodeRefStates( GLOBALSETTINGS_NODEREF_STATES ), m_aPropStatesEnabled( GLOBALSETTINGS_PROPERTY_STATESENABLED ), m_aPropLocked( GLOBALSETTINGS_PROPERTY_LOCKED ), diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index f27ffdd6fb4c..cafd7a4f7755 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -155,9 +155,6 @@ class ConfigurationAccess_UICommand : // Order is necessary for right initializa OUString m_aPropName; OUString m_aPropPopup; OUString m_aPropProperties; - OUString m_aXMLFileFormatVersion; - OUString m_aVersion; - OUString m_aExtension; OUString m_aPrivateResourceURL; Reference< XNameAccess > m_xGenericUICommands; Reference< XMultiServiceFactory > m_xConfigProvider; |