diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-01-21 15:21:16 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-01-21 15:21:16 +0100 |
commit | 7c704c78d3c652504c064b4ac7af55a2c1ee49bb (patch) | |
tree | 623358cf25839219ef4fd90eea4f3eaa55389a1f /testtools | |
parent | 0d5167915b47df7c3e450614ea50d845ba959df3 (diff) |
Removed some unused parameters; added SAL_UNUSED_PARAMETER.
SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC)
is used to annotate legitimately unused parameters, so that static
analysis tools can tell legitimately unused parameters from truly
unnecessary ones. To that end, some patches for external modules
are also added, that are only applied when compiling with GCC and
add necessary __attribute__ ((unused)) in headers.
Diffstat (limited to 'testtools')
-rw-r--r-- | testtools/source/bridgetest/bridgetest.cxx | 3 | ||||
-rw-r--r-- | testtools/source/bridgetest/constructors.cxx | 6 | ||||
-rw-r--r-- | testtools/source/bridgetest/cppobj.cxx | 6 |
3 files changed, 10 insertions, 5 deletions
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 46435fb7e2d6..968c5f1f216b 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -1297,7 +1297,8 @@ extern "C" { //================================================================================================== SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( - const sal_Char * pImplName, void * pServiceManager, void * ) + const sal_Char * pImplName, void * pServiceManager, + SAL_UNUSED_PARAMETER void * ) { void * pRet = 0; diff --git a/testtools/source/bridgetest/constructors.cxx b/testtools/source/bridgetest/constructors.cxx index 22a6ef0b4496..48435782781e 100644 --- a/testtools/source/bridgetest/constructors.cxx +++ b/testtools/source/bridgetest/constructors.cxx @@ -448,7 +448,8 @@ void Impl2::setatt1( double _att1 )throw (::com::sun::star::uno::RuntimeExceptio } css::uno::Reference< css::uno::XInterface > SAL_CALL create( - css::uno::Reference< css::uno::XComponentContext > const &) + SAL_UNUSED_PARAMETER css::uno::Reference< css::uno::XComponentContext > + const &) SAL_THROW((css::uno::Exception)) { return static_cast< ::cppu::OWeakObject * >(new Impl); @@ -468,7 +469,8 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() { } css::uno::Reference< css::uno::XInterface > SAL_CALL create2( - css::uno::Reference< css::uno::XComponentContext > const &) + SAL_UNUSED_PARAMETER css::uno::Reference< css::uno::XComponentContext > + const &) SAL_THROW((css::uno::Exception)) { return static_cast< ::cppu::OWeakObject * >(new Impl2); diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx index ae2272401d4d..0df13f51ca26 100644 --- a/testtools/source/bridgetest/cppobj.cxx +++ b/testtools/source/bridgetest/cppobj.cxx @@ -1183,7 +1183,8 @@ Sequence< OUString > Test_Impl::getSupportedServiceNames() // ... //================================================================================================== -static Reference< XInterface > SAL_CALL Test_Impl_create( const Reference< XMultiServiceFactory > & ) +static Reference< XInterface > SAL_CALL Test_Impl_create( + SAL_UNUSED_PARAMETER const Reference< XMultiServiceFactory > & ) { return Reference< XInterface >( (XBridgeTest *)new Test_Impl() ); } @@ -1193,7 +1194,8 @@ static Reference< XInterface > SAL_CALL Test_Impl_create( const Reference< XMult extern "C" { SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( - const sal_Char * pImplName, void * pServiceManager, void * ) + const sal_Char * pImplName, SAL_UNUSED_PARAMETER void * pServiceManager, + SAL_UNUSED_PARAMETER void * ) { void * pRet = 0; |