summaryrefslogtreecommitdiff
path: root/cppu/source
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 /cppu/source
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 'cppu/source')
-rw-r--r--cppu/source/LogBridge/LogBridge.cxx4
-rw-r--r--cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx2
-rw-r--r--cppu/source/threadpool/threadpool.cxx6
-rw-r--r--cppu/source/uno/IdentityMapping.cxx2
-rw-r--r--cppu/source/uno/lbenv.cxx13
5 files changed, 13 insertions, 14 deletions
diff --git a/cppu/source/LogBridge/LogBridge.cxx b/cppu/source/LogBridge/LogBridge.cxx
index f6077d2a750e..0451f9484579 100644
--- a/cppu/source/LogBridge/LogBridge.cxx
+++ b/cppu/source/LogBridge/LogBridge.cxx
@@ -209,8 +209,8 @@ int LogBridge::v_isValid(rtl::OUString * pReason)
void LogProbe(
bool pre,
- void * /*pThis*/,
- void * /*pContext*/,
+ SAL_UNUSED_PARAMETER void * /*pThis*/,
+ SAL_UNUSED_PARAMETER void * /*pContext*/,
typelib_TypeDescriptionReference * pReturnTypeRef,
typelib_MethodParameter * pParams,
sal_Int32 nParams,
diff --git a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
index 002b7eb56822..5d334be5cfad 100644
--- a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
+++ b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
@@ -183,7 +183,7 @@ extern "C" { static void SAL_CALL s_Proxy_dispatch(
ppException );
}}
-extern "C" void SAL_CALL Proxy_free(uno_ExtEnvironment * /*pEnv*/, void * pProxy) SAL_THROW_EXTERN_C()
+extern "C" void SAL_CALL Proxy_free(SAL_UNUSED_PARAMETER uno_ExtEnvironment * /*pEnv*/, void * pProxy) SAL_THROW_EXTERN_C()
{
Proxy * pThis = static_cast<Proxy * >(reinterpret_cast<uno_Interface *>(pProxy));
delete pThis;
diff --git a/cppu/source/threadpool/threadpool.cxx b/cppu/source/threadpool/threadpool.cxx
index 312fd89c4375..9dda867a0878 100644
--- a/cppu/source/threadpool/threadpool.cxx
+++ b/cppu/source/threadpool/threadpool.cxx
@@ -428,7 +428,7 @@ uno_threadpool_create() SAL_THROW_EXTERN_C()
}
extern "C" void SAL_CALL
-uno_threadpool_attach( uno_ThreadPool ) SAL_THROW_EXTERN_C()
+uno_threadpool_attach(SAL_UNUSED_PARAMETER uno_ThreadPool) SAL_THROW_EXTERN_C()
{
sal_Sequence *pThreadId = 0;
uno_getIdOfCurrentThread( &pThreadId );
@@ -453,14 +453,14 @@ uno_threadpool_enter( uno_ThreadPool hPool , void **ppJob )
}
extern "C" void SAL_CALL
-uno_threadpool_detach( uno_ThreadPool ) SAL_THROW_EXTERN_C()
+uno_threadpool_detach(SAL_UNUSED_PARAMETER uno_ThreadPool) SAL_THROW_EXTERN_C()
{
// we might do here some tiding up in case a thread called attach but never detach
}
extern "C" void SAL_CALL
uno_threadpool_putJob(
- uno_ThreadPool,
+ SAL_UNUSED_PARAMETER uno_ThreadPool,
sal_Sequence *pThreadId,
void *pJob,
void ( SAL_CALL * doRequest ) ( void *pThreadSpecificData ),
diff --git a/cppu/source/uno/IdentityMapping.cxx b/cppu/source/uno/IdentityMapping.cxx
index 868a4d7c5e3c..ee1d9d1412e1 100644
--- a/cppu/source/uno/IdentityMapping.cxx
+++ b/cppu/source/uno/IdentityMapping.cxx
@@ -76,7 +76,7 @@ static void SAL_CALL s_release(uno_Mapping * pMapping) SAL_THROW(())
static void SAL_CALL s_mapInterface(uno_Mapping * pMapping,
void ** ppOut,
void * pInterface,
- struct _typelib_InterfaceTypeDescription * /*pInterfaceTypeDescr*/)
+ SAL_UNUSED_PARAMETER struct _typelib_InterfaceTypeDescription * /*pInterfaceTypeDescr*/)
SAL_THROW(())
{
*ppOut = pInterface;
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index 79581a5d765b..baced8b1d3dd 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -616,7 +616,7 @@ static void SAL_CALL defenv_harden(
}
//------------------------------------------------------------------------------
-static void SAL_CALL defenv_dispose( uno_Environment * )
+static void SAL_CALL defenv_dispose( SAL_UNUSED_PARAMETER uno_Environment * )
{
}
}
@@ -908,7 +908,7 @@ static void SAL_CALL unoenv_computeObjectIdentifier(
//==============================================================================
static void SAL_CALL unoenv_acquireInterface(
- uno_ExtEnvironment *, void * pUnoI_ )
+ SAL_UNUSED_PARAMETER uno_ExtEnvironment *, void * pUnoI_ )
{
uno_Interface * pUnoI = reinterpret_cast< uno_Interface * >(pUnoI_);
(*pUnoI->acquire)( pUnoI );
@@ -916,7 +916,7 @@ static void SAL_CALL unoenv_acquireInterface(
//==============================================================================
static void SAL_CALL unoenv_releaseInterface(
- uno_ExtEnvironment *, void * pUnoI_ )
+ SAL_UNUSED_PARAMETER uno_ExtEnvironment *, void * pUnoI_ )
{
uno_Interface * pUnoI = reinterpret_cast< uno_Interface * >(pUnoI_);
(*pUnoI->release)( pUnoI );
@@ -1059,8 +1059,7 @@ inline void EnvironmentsData::getRegisteredEnvironments(
}
static bool loadEnv(OUString const & cLibStem,
- uno_Environment * pEnv,
- void * /*pContext*/)
+ uno_Environment * pEnv)
{
#ifdef IOS
oslModule hMod;
@@ -1121,7 +1120,7 @@ static uno_Environment * initDefaultEnvironment(
rtl::OUString libStem = envPurpose.copy(envPurpose.lastIndexOf(':') + 1);
libStem += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_uno_uno") );
- if(!loadEnv(libStem, pEnv, pContext))
+ if(!loadEnv(libStem, pEnv))
{
pEnv->release(pEnv);
return NULL;
@@ -1136,7 +1135,7 @@ static uno_Environment * initDefaultEnvironment(
aLibName.appendAscii( RTL_CONSTASCII_STRINGPARAM("_uno" ) );
OUString aStr( aLibName.makeStringAndClear() );
- if (!loadEnv(aStr, pEnv, pContext))
+ if (!loadEnv(aStr, pEnv))
{
pEnv->release(pEnv);
return NULL;