summaryrefslogtreecommitdiff
path: root/unotools/source/ucbhelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-21 15:21:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-21 15:21:16 +0100
commit7c704c78d3c652504c064b4ac7af55a2c1ee49bb (patch)
tree623358cf25839219ef4fd90eea4f3eaa55389a1f /unotools/source/ucbhelper
parent0d5167915b47df7c3e450614ea50d845ba959df3 (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 'unotools/source/ucbhelper')
-rw-r--r--unotools/source/ucbhelper/XTempFile.hxx3
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.cxx2
-rw-r--r--unotools/source/ucbhelper/ucbstreamhelper.cxx14
-rw-r--r--unotools/source/ucbhelper/xtempfile.cxx7
4 files changed, 13 insertions, 13 deletions
diff --git a/unotools/source/ucbhelper/XTempFile.hxx b/unotools/source/ucbhelper/XTempFile.hxx
index da570ed39d1e..7f478f561a25 100644
--- a/unotools/source/ucbhelper/XTempFile.hxx
+++ b/unotools/source/ucbhelper/XTempFile.hxx
@@ -35,7 +35,6 @@
#include <com/sun/star/io/XTempFile.hpp>
#include <com/sun/star/io/XTruncate.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase5.hxx>
#include <cppuhelper/propertysetmixin.hxx>
@@ -142,7 +141,7 @@ public:
static ::rtl::OUString getImplementationName_Static ();
static ::com::sun::star::uno::Sequence < ::rtl::OUString > getSupportedServiceNames_Static();
- static ::com::sun::star::uno::Reference < com::sun::star::lang::XSingleComponentFactory > createServiceFactory_Static( com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > const & rServiceFactory );
+ static ::com::sun::star::uno::Reference < com::sun::star::lang::XSingleComponentFactory > createServiceFactory_Static();
private:
OTempFileService( OTempFileService & );
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index a313a1fac18a..18bffcbd7c7a 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -1591,7 +1591,7 @@ void UcbLockBytes::Cancel()
}
//----------------------------------------------------------------------------
-IMPL_LINK( UcbLockBytes, DataAvailHdl, void*, EMPTYARG )
+IMPL_LINK( UcbLockBytes, DataAvailHdl, SAL_UNUSED_PARAMETER void*, EMPTYARG )
{
if ( hasInputStream_Impl() && m_xHandler.Is() )
m_xHandler->Handle( UcbLockBytesHandler::DATA_AVAILABLE, this );
diff --git a/unotools/source/ucbhelper/ucbstreamhelper.cxx b/unotools/source/ucbhelper/ucbstreamhelper.cxx
index b042078145c7..d7ac3bcb62c7 100644
--- a/unotools/source/ucbhelper/ucbstreamhelper.cxx
+++ b/unotools/source/ucbhelper/ucbstreamhelper.cxx
@@ -53,7 +53,7 @@ namespace utl
static SvStream* lcl_CreateStream( const String& rFileName, StreamMode eOpenMode,
Reference < XInteractionHandler > xInteractionHandler,
- UcbLockBytesHandler* pHandler, sal_Bool /*bForceSynchron*/, sal_Bool bEnsureFileExists )
+ UcbLockBytesHandler* pHandler, sal_Bool bEnsureFileExists )
{
SvStream* pStream = NULL;
::ucbhelper::ContentBroker* pBroker = ::ucbhelper::ContentBroker::get();
@@ -150,23 +150,23 @@ static SvStream* lcl_CreateStream( const String& rFileName, StreamMode eOpenMode
//============================================================================
SvStream* UcbStreamHelper::CreateStream( const String& rFileName, StreamMode eOpenMode,
- UcbLockBytesHandler* pHandler, sal_Bool bForceSynchron )
+ UcbLockBytesHandler* pHandler )
{
- return lcl_CreateStream( rFileName, eOpenMode, Reference < XInteractionHandler >(), pHandler, bForceSynchron, sal_True /* bEnsureFileExists */ );
+ return lcl_CreateStream( rFileName, eOpenMode, Reference < XInteractionHandler >(), pHandler, sal_True /* bEnsureFileExists */ );
}
SvStream* UcbStreamHelper::CreateStream( const String& rFileName, StreamMode eOpenMode,
Reference < XInteractionHandler > xInteractionHandler,
- UcbLockBytesHandler* pHandler, sal_Bool bForceSynchron )
+ UcbLockBytesHandler* pHandler )
{
- return lcl_CreateStream( rFileName, eOpenMode, xInteractionHandler, pHandler, bForceSynchron, sal_True /* bEnsureFileExists */ );
+ return lcl_CreateStream( rFileName, eOpenMode, xInteractionHandler, pHandler, sal_True /* bEnsureFileExists */ );
}
SvStream* UcbStreamHelper::CreateStream( const String& rFileName, StreamMode eOpenMode,
sal_Bool bFileExists,
- UcbLockBytesHandler* pHandler, sal_Bool bForceSynchron )
+ UcbLockBytesHandler* pHandler )
{
- return lcl_CreateStream( rFileName, eOpenMode, Reference < XInteractionHandler >(), pHandler, bForceSynchron, !bFileExists );
+ return lcl_CreateStream( rFileName, eOpenMode, Reference < XInteractionHandler >(), pHandler, !bFileExists );
}
SvStream* UcbStreamHelper::CreateStream( Reference < XInputStream > xStream )
diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx
index 4301dff0c6d4..7866ca802f12 100644
--- a/unotools/source/ucbhelper/xtempfile.cxx
+++ b/unotools/source/ucbhelper/xtempfile.cxx
@@ -472,7 +472,7 @@ throw ( ::css::uno::RuntimeException )
return static_cast< ::cppu::OWeakObject * >( new OTempFileService(context) );
}
-::css::uno::Reference < ::css::lang::XSingleComponentFactory > OTempFileService::createServiceFactory_Static( ::css::uno::Reference < ::css::lang::XMultiServiceFactory > const & )
+::css::uno::Reference < ::css::lang::XSingleComponentFactory > OTempFileService::createServiceFactory_Static()
{
return ::cppu::createSingleComponentFactory( XTempFile_createInstance, getImplementationName_Static(), getSupportedServiceNames_Static() );
}
@@ -485,7 +485,8 @@ throw ( ::css::uno::RuntimeException )
* @return a component factory (generic uno interface)
*/
extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL utl_component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
+ const sal_Char * pImplName, void * pServiceManager,
+ SAL_UNUSED_PARAMETER void * /*pRegistryKey*/ )
{
void * pRet = 0;
::css::uno::Reference< ::css::lang::XMultiServiceFactory > xSMgr(
@@ -493,7 +494,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL utl_component_getFactory(
::css::uno::Reference< ::css::lang::XSingleComponentFactory > xFactory;
if (OTempFileService::getImplementationName_Static().compareToAscii( pImplName ) == 0)
- xFactory = OTempFileService::createServiceFactory_Static ( xSMgr );
+ xFactory = OTempFileService::createServiceFactory_Static();
if ( xFactory.is() )
{