summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx2
-rw-r--r--bridges/source/jni_uno/jni_java2uno.cxx2
-rw-r--r--bridges/source/jni_uno/jni_uno2java.cxx8
-rw-r--r--compilerplugins/clang/cstylecast.cxx13
-rw-r--r--connectivity/source/drivers/odbc/OPreparedStatement.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_connection.cxx4
-rw-r--r--cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx4
-rw-r--r--cppu/source/uno/copy.hxx6
-rw-r--r--cppu/source/uno/lbmap.cxx2
-rw-r--r--cppu/source/uno/sequence.cxx2
-rw-r--r--include/uno/current_context.hxx4
-rw-r--r--include/uno/mapping.hxx2
-rw-r--r--lotuswordpro/source/filter/lwptools.cxx8
-rw-r--r--registry/source/keyimpl.cxx8
-rw-r--r--registry/source/regimpl.cxx4
-rw-r--r--registry/source/registry.cxx8
-rw-r--r--registry/source/regkey.cxx18
-rw-r--r--sal/qa/osl/module/osl_Module.cxx21
-rw-r--r--sal/qa/osl/process/osl_process.cxx3
-rw-r--r--sfx2/source/appl/shutdowniconunx.cxx2
-rw-r--r--stoc/source/invocation_adapterfactory/iafactory.cxx2
-rw-r--r--stoc/source/security/access_controller.cxx8
-rw-r--r--vcl/generic/fontmanager/parseAFM.cxx22
-rw-r--r--vcl/unx/generic/printer/cupsmgr.cxx2
25 files changed, 86 insertions, 75 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
index 767a7fe9c0af..ef6cdec8e700 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -237,7 +237,7 @@ static typelib_TypeClass cpp2uno_call(
uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
}
// complex return ptr is set to return reg
- *(void **)pRegisterReturn = pCppReturn;
+ *reinterpret_cast<void **>(pRegisterReturn) = pCppReturn;
}
if ( pReturnTypeDescr )
{
@@ -348,7 +348,7 @@ typelib_TypeClass cpp_vtable_call(
XInterface * pInterface = 0;
(*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)
( pCppI->getBridge()->getCppEnv(),
- (void **)&pInterface,
+ reinterpret_cast<void **>(&pInterface),
pCppI->getOid().pData,
reinterpret_cast<typelib_InterfaceTypeDescription *>( pTD ) );
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
index 12cc9335c02f..fb286db7943f 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -404,7 +404,7 @@ void unoInterfaceProxyDispatch(
uno_Interface * pInterface = 0;
(*pThis->getBridge()->getUnoEnv()->getRegisteredInterface)(
pThis->getBridge()->getUnoEnv(),
- (void **)&pInterface, pThis->oid.pData, reinterpret_cast<typelib_InterfaceTypeDescription *>(pTD) );
+ reinterpret_cast<void **>(&pInterface), pThis->oid.pData, reinterpret_cast<typelib_InterfaceTypeDescription *>(pTD) );
if (pInterface)
{
diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx
index b827a1e07b6a..5c992f167cbb 100644
--- a/bridges/source/jni_uno/jni_java2uno.cxx
+++ b/bridges/source/jni_uno/jni_java2uno.cxx
@@ -186,7 +186,7 @@ jobject Bridge::call_uno(
#endif
(nParams * sizeof (void *)) +
return_size + (nParams * sizeof (largest)) );
- void ** uno_args = (void **) mem;
+ void ** uno_args = reinterpret_cast<void **>(mem);
void * uno_ret = return_size == 0 ? 0 : (mem + (nParams * sizeof (void *)));
largest * uno_args_mem = reinterpret_cast<largest *>
(mem + (nParams * sizeof (void *)) + return_size);
diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx
index c36e8a12e9b8..a9798e333299 100644
--- a/bridges/source/jni_uno/jni_uno2java.cxx
+++ b/bridges/source/jni_uno/jni_uno2java.cxx
@@ -489,7 +489,7 @@ uno_Interface * Bridge::map_to_uno(
uno_Interface * pUnoI = 0;
(*m_uno_env->getRegisteredInterface)(
- m_uno_env, (void **)&pUnoI,
+ m_uno_env, reinterpret_cast<void **>(&pUnoI),
oid.pData, reinterpret_cast<typelib_InterfaceTypeDescription *>(info->m_td.get()) );
if (0 == pUnoI) // no existing interface, register new proxy
@@ -500,7 +500,7 @@ uno_Interface * Bridge::map_to_uno(
javaI, static_cast<jstring>(jo_oid.get()), oid, info );
(*m_uno_env->registerProxyInterface)(
- m_uno_env, (void **)&pUnoI,
+ m_uno_env, reinterpret_cast<void **>(&pUnoI),
UNO_proxy_free,
oid.pData, reinterpret_cast<typelib_InterfaceTypeDescription *>(info->m_td.get()) );
}
@@ -667,7 +667,7 @@ void SAL_CALL UNO_proxy_dispatch(
uno_Interface * pInterface = 0;
(*bridge->m_uno_env->getRegisteredInterface)(
bridge->m_uno_env,
- (void **) &pInterface, that->m_oid.pData,
+ reinterpret_cast<void **>(&pInterface), that->m_oid.pData,
reinterpret_cast<typelib_InterfaceTypeDescription *>(demanded_td.get()) );
if (0 == pInterface)
@@ -719,7 +719,7 @@ void SAL_CALL UNO_proxy_dispatch(
(*bridge->m_uno_env->registerProxyInterface)(
bridge->m_uno_env,
- (void **) &pUnoI2,
+ reinterpret_cast<void **>(&pUnoI2),
UNO_proxy_free, that->m_oid.pData,
reinterpret_cast<
typelib_InterfaceTypeDescription * >(
diff --git a/compilerplugins/clang/cstylecast.cxx b/compilerplugins/clang/cstylecast.cxx
index b8f3b5b8363c..b6bb453127c0 100644
--- a/compilerplugins/clang/cstylecast.cxx
+++ b/compilerplugins/clang/cstylecast.cxx
@@ -96,18 +96,17 @@ bool CStyleCast::VisitCStyleCastExpr(const CStyleCastExpr * expr) {
std::string incompFrom;
std::string incompTo;
if( expr->getCastKind() == CK_BitCast ) {
- QualType t1 = resolvePointers(expr->getSubExprAsWritten()->getType());
- QualType t2 = resolvePointers(expr->getType());
- // Ignore "safe" casts for now that involve casting from or to void*
- // (and can thus not be interpreted as either a static_cast or a
+ QualType t = resolvePointers(expr->getSubExprAsWritten()->getType());
+ // Ignore "safe" casts for now that involve casting from void* (and can
+ // thus not be interpreted as either a static_cast or a
// reinterpret_cast, with potentially different results):
- if (t1->isVoidType() || t2->isVoidType()) {
+ if (t->isVoidType()) {
return true;
}
- if (t1->isIncompleteType()) {
+ if (t->isIncompleteType()) {
incompFrom = "incomplete ";
}
- if (t2->isIncompleteType()) {
+ if (resolvePointers(expr->getType())->isIncompleteType()) {
incompTo = "incomplete ";
}
}
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index dec05dd69386..82f5c984b282 100644
--- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
@@ -186,7 +186,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeExc
// Get the parameter number that requires data
sal_Int32* paramIndex = 0;
- nReturn = N3SQLParamData(m_aStatementHandle,(SQLPOINTER*)&paramIndex);
+ nReturn = N3SQLParamData(m_aStatementHandle, reinterpret_cast<SQLPOINTER*>(&paramIndex));
// If the parameter index is -1, there is no
// more data required
diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx
index 285462d83a63..c349146c6bbf 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.cxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.cxx
@@ -146,8 +146,8 @@ static sal_Int32 readLogLevelFromConfiguration()
{
sal_Int32 loglevel = LogLevel::NONE;
OUString fileName;
- osl_getModuleURLFromAddress(
- (void*) readLogLevelFromConfiguration, &fileName.pData );
+ osl_getModuleURLFromFunctionAddress(
+ reinterpret_cast<oslGenericFunction>(readLogLevelFromConfiguration), &fileName.pData );
fileName = fileName.copy( fileName.lastIndexOf( '/' )+1 );
#ifdef MACOSX
fileName += "../Resources/";
diff --git a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
index bb29e13b9511..5e03243df2ae 100644
--- a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
+++ b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
@@ -163,7 +163,7 @@ void Mapping::mapInterface(
OSL_ASSERT(pOId);
// try to get any known interface from target environment
- m_to.get()->pExtEnv->getRegisteredInterface(m_to.get()->pExtEnv, (void **)ppOut, pOId, pTypeDescr);
+ m_to.get()->pExtEnv->getRegisteredInterface(m_to.get()->pExtEnv, reinterpret_cast<void **>(ppOut), pOId, pTypeDescr);
if (!*ppOut) // not yet there, register new proxy interface
{
@@ -179,7 +179,7 @@ void Mapping::mapInterface(
// proxy may be exchanged during registration
m_to.get()->pExtEnv->registerProxyInterface(m_to.get()->pExtEnv,
- (void **)&pProxy,
+ reinterpret_cast<void **>(&pProxy),
Proxy_free,
pOId,
pTypeDescr);
diff --git a/cppu/source/uno/copy.hxx b/cppu/source/uno/copy.hxx
index fc2ca00ceeb2..24d7864825c6 100644
--- a/cppu/source/uno/copy.hxx
+++ b/cppu/source/uno/copy.hxx
@@ -479,16 +479,16 @@ inline uno_Sequence * icopyConstructSequence(
if (pDest != 0)
{
char * pElements = pDest->elements;
- void ** pSourceElements = (void **)pSource->elements;
+ void ** pSourceElements = reinterpret_cast<void **>(pSource->elements);
typelib_TypeDescription * pElementTypeDescr = 0;
TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
for ( sal_Int32 nPos = nElements; nPos--; )
{
- ((void **)pElements)[nPos] = 0;
+ reinterpret_cast<void **>(pElements)[nPos] = 0;
if (((void **)pSourceElements)[nPos])
{
(*mapping->mapInterface)(
- mapping, (void **)pElements + nPos,
+ mapping, reinterpret_cast<void **>(pElements) + nPos,
pSourceElements[nPos],
reinterpret_cast<typelib_InterfaceTypeDescription *>(
pElementTypeDescr) );
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index aa6587f74237..2354e7d88c4e 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -228,7 +228,7 @@ static void SAL_CALL mediate_mapInterface(
uno_Mapping * pFrom2Uno = that->aFrom2Uno.get();
uno_Interface * pUnoI = 0;
- (*pFrom2Uno->mapInterface)( pFrom2Uno, (void **) &pUnoI, pInterface, pInterfaceTypeDescr );
+ (*pFrom2Uno->mapInterface)( pFrom2Uno, reinterpret_cast<void **>(&pUnoI), pInterface, pInterfaceTypeDescr );
if (0 == pUnoI)
{
void * pOut = *ppOut;
diff --git a/cppu/source/uno/sequence.cxx b/cppu/source/uno/sequence.cxx
index 9575fcc7c05b..7dc3e9f861bc 100644
--- a/cppu/source/uno/sequence.cxx
+++ b/cppu/source/uno/sequence.cxx
@@ -568,7 +568,7 @@ static inline bool icopyConstructFromElements(
pSeq = reallocSeq( pSeq, sizeof(void *), nAlloc );
if (pSeq != 0)
{
- void ** pDestElements = (void **) pSeq->elements;
+ void ** pDestElements = reinterpret_cast<void **>(pSeq->elements);
for ( sal_Int32 nPos = nStartIndex; nPos < nStopIndex; ++nPos )
{
_acquire( pDestElements[nPos] =
diff --git a/include/uno/current_context.hxx b/include/uno/current_context.hxx
index 9e043491e332..5627044039ab 100644
--- a/include/uno/current_context.hxx
+++ b/include/uno/current_context.hxx
@@ -45,7 +45,7 @@ inline Reference< XCurrentContext > SAL_CALL getCurrentContext()
{
Reference< XCurrentContext > xRet;
::rtl::OUString aEnvTypeName( CPPU_CURRENT_LANGUAGE_BINDING_NAME );
- ::uno_getCurrentContext( (void **)&xRet, aEnvTypeName.pData, 0 );
+ ::uno_getCurrentContext( reinterpret_cast<void **>(&xRet), aEnvTypeName.pData, 0 );
return xRet;
}
/** Setting the current context.
@@ -95,7 +95,7 @@ public:
inline ContextLayer::ContextLayer( Reference< XCurrentContext > const & xNewContext )
: m_aEnvTypeName( CPPU_CURRENT_LANGUAGE_BINDING_NAME )
{
- ::uno_getCurrentContext( (void **)&m_xPreviousContext, m_aEnvTypeName.pData, 0 );
+ ::uno_getCurrentContext( reinterpret_cast<void **>(&m_xPreviousContext), m_aEnvTypeName.pData, 0 );
::uno_setCurrentContext( xNewContext.get(), m_aEnvTypeName.pData, 0 );
}
diff --git a/include/uno/mapping.hxx b/include/uno/mapping.hxx
index 1199c71ff4e3..51a12d32b53c 100644
--- a/include/uno/mapping.hxx
+++ b/include/uno/mapping.hxx
@@ -325,7 +325,7 @@ inline bool mapToUno( uno_Interface ** ppRet, const Reference< C > & x )
::rtl::OUString( UNO_LB_UNO ) );
OSL_ASSERT( aMapping.is() );
aMapping.mapInterface(
- (void **)ppRet, x.get(), ::cppu::getTypeFavourUnsigned( &x ) );
+ reinterpret_cast<void **>(ppRet), x.get(), ::cppu::getTypeFavourUnsigned( &x ) );
return (0 != *ppRet);
}
diff --git a/lotuswordpro/source/filter/lwptools.cxx b/lotuswordpro/source/filter/lwptools.cxx
index 7015651dc309..72a86e04f8ec 100644
--- a/lotuswordpro/source/filter/lwptools.cxx
+++ b/lotuswordpro/source/filter/lwptools.cxx
@@ -261,13 +261,13 @@ XFDateStyle* LwpTools::GetSystemDateStyle(bool bLongFormat)
UErrorCode status = U_ZERO_ERROR;
UChar* pattern = NULL;
- nLengthNeed = udat_toPattern((void *const *)fmt,sal_False,NULL,nLength,&status);
+ nLengthNeed = udat_toPattern(reinterpret_cast<void **>(fmt),sal_False,NULL,nLength,&status);
if (status == U_BUFFER_OVERFLOW_ERROR)
{
status = U_ZERO_ERROR;
nLength = nLengthNeed +1;
pattern = (UChar*)malloc(sizeof(UChar)*nLength);
- udat_toPattern((void *const *)fmt,sal_False,pattern,nLength,&status);
+ udat_toPattern(reinterpret_cast<void **>(fmt),sal_False,pattern,nLength,&status);
}
if (pattern == NULL)
return NULL;
@@ -649,13 +649,13 @@ XFTimeStyle* LwpTools::GetSystemTimeStyle()
int32_t nLengthNeed;
UErrorCode status = U_ZERO_ERROR;
UChar* pattern = NULL;
- nLengthNeed = udat_toPattern((void *const *)fmt,false,NULL,nLength,&status);
+ nLengthNeed = udat_toPattern(reinterpret_cast<void **>(fmt),false,NULL,nLength,&status);
if (status == U_BUFFER_OVERFLOW_ERROR)
{
status = U_ZERO_ERROR;
nLength = nLengthNeed +1;
pattern = (UChar*)malloc(sizeof(UChar)*nLength);
- udat_toPattern((void *const *)fmt,false,pattern,nLength,&status);
+ udat_toPattern(reinterpret_cast<void **>(fmt),false,pattern,nLength,&status);
}
if (pattern == NULL)
diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx
index 3913c8289250..e8c1a67160fa 100644
--- a/registry/source/keyimpl.cxx
+++ b/registry/source/keyimpl.cxx
@@ -90,7 +90,7 @@ RegError ORegKey::openSubKeys(const OUString& keyName, RegKeyHandle** phOpenSubK
ORegKey* pKey = this;
if ( !keyName.isEmpty() )
{
- _ret = openKey(keyName, (RegKeyHandle*)&pKey);
+ _ret = openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pKey));
if (_ret != REG_NO_ERROR)
return _ret;
}
@@ -113,7 +113,7 @@ RegError ORegKey::openSubKeys(const OUString& keyName, RegKeyHandle** phOpenSubK
OUString const sSubKeyName = iter.m_pszName;
ORegKey* pOpenSubKey = 0;
- _ret = pKey->openKey(sSubKeyName, (RegKeyHandle*)&pOpenSubKey);
+ _ret = pKey->openKey(sSubKeyName, reinterpret_cast<RegKeyHandle*>(&pOpenSubKey));
if (_ret != REG_NO_ERROR)
{
*phOpenSubKeys = NULL;
@@ -130,7 +130,7 @@ RegError ORegKey::openSubKeys(const OUString& keyName, RegKeyHandle** phOpenSubK
_err = rStoreDir.next(iter);
}
- *phOpenSubKeys = (RegKeyHandle*)pSubKeys;
+ *phOpenSubKeys = reinterpret_cast<RegKeyHandle*>(pSubKeys);
if (!keyName.isEmpty())
{
(void) releaseKey(pKey);
@@ -154,7 +154,7 @@ RegError ORegKey::getKeyNames(const OUString& keyName,
ORegKey* pKey = this;
if (!keyName.isEmpty())
{
- _ret = openKey(keyName, (RegKeyHandle*)&pKey);
+ _ret = openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pKey));
if (_ret != REG_NO_ERROR)
return _ret;
}
diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx
index 039cde3270b7..90c1ceed4284 100644
--- a/registry/source/regimpl.cxx
+++ b/registry/source/regimpl.cxx
@@ -830,7 +830,7 @@ RegError ORegistry::eraseKey(ORegKey* pKey, const OUString& keyName)
}
ORegKey* pOldKey = 0;
- _ret = pKey->openKey(keyName, (RegKeyHandle*)&pOldKey);
+ _ret = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pOldKey));
if (_ret != REG_NO_ERROR)
return _ret;
@@ -1363,7 +1363,7 @@ RegError ORegistry::loadAndSaveKeys(ORegKey* pTargetKey,
}
ORegKey* pTmpKey = 0;
- _ret = pSourceKey->openKey(keyName, (RegKeyHandle*)&pTmpKey);
+ _ret = pSourceKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pTmpKey));
if (_ret != REG_NO_ERROR)
return _ret;
diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx
index fc1412dfbcc3..961b1ac6b645 100644
--- a/registry/source/registry.cxx
+++ b/registry/source/registry.cxx
@@ -264,14 +264,14 @@ static RegError REGISTRY_CALLTYPE loadKey(RegHandle hReg,
ORegKey* pNewKey = 0;
- RegError _ret = pKey->openKey(keyName, (RegKeyHandle*)&pNewKey);
+ RegError _ret = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pNewKey));
if (_ret == REG_NO_ERROR)
{
pKey->releaseKey(pNewKey);
pKey->deleteKey(keyName);
}
- _ret = pKey->createKey(keyName, (RegKeyHandle*)&pNewKey);
+ _ret = pKey->createKey(keyName, reinterpret_cast<RegKeyHandle*>(&pNewKey));
if (_ret != REG_NO_ERROR)
return _ret;
@@ -312,7 +312,7 @@ static RegError REGISTRY_CALLTYPE saveKey(RegHandle hReg,
return REG_INVALID_KEY;
ORegKey* pNewKey = 0;
- RegError _ret = pKey->openKey(keyName, (RegKeyHandle*)&pNewKey);
+ RegError _ret = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pNewKey));
if (_ret != REG_NO_ERROR)
return _ret;
@@ -355,7 +355,7 @@ static RegError REGISTRY_CALLTYPE mergeKey(RegHandle hReg,
if (keyName->length)
{
ORegKey* pNewKey = 0;
- RegError _ret = pKey->createKey(keyName, (RegKeyHandle*)&pNewKey);
+ RegError _ret = pKey->createKey(keyName, reinterpret_cast<RegKeyHandle*>(&pNewKey));
if (_ret != REG_NO_ERROR)
return _ret;
diff --git a/registry/source/regkey.cxx b/registry/source/regkey.cxx
index 2512dfd253d8..6e314e02a639 100644
--- a/registry/source/regkey.cxx
+++ b/registry/source/regkey.cxx
@@ -218,7 +218,7 @@ RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey,
if (keyName->length)
{
ORegKey* pSubKey = 0;
- RegError _ret1 = pKey->openKey(keyName, (RegKeyHandle*)&pSubKey);
+ RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
if (_ret1 != REG_NO_ERROR)
return _ret1;
@@ -260,7 +260,7 @@ RegError REGISTRY_CALLTYPE setLongListValue(RegKeyHandle hKey,
if (keyName->length)
{
ORegKey* pSubKey = 0;
- RegError _ret1 = pKey->openKey(keyName, (RegKeyHandle*)&pSubKey);
+ RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
if (_ret1 != REG_NO_ERROR)
return _ret1;
@@ -302,7 +302,7 @@ RegError REGISTRY_CALLTYPE setStringListValue(RegKeyHandle hKey,
if (keyName->length)
{
ORegKey* pSubKey = 0;
- RegError _ret1 = pKey->openKey(keyName, (RegKeyHandle*)&pSubKey);
+ RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
if (_ret1 != REG_NO_ERROR)
return _ret1;
@@ -344,7 +344,7 @@ RegError REGISTRY_CALLTYPE setUnicodeListValue(RegKeyHandle hKey,
if (keyName->length)
{
ORegKey* pSubKey = 0;
- RegError _ret1 = pKey->openKey(keyName, (RegKeyHandle*)&pSubKey);
+ RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
if (_ret1 != REG_NO_ERROR)
return _ret1;
@@ -389,7 +389,7 @@ RegError REGISTRY_CALLTYPE getValueInfo(RegKeyHandle hKey,
if (keyName->length)
{
ORegKey* pSubKey = 0;
- RegError _ret = pKey->openKey(keyName, (RegKeyHandle*)&pSubKey);
+ RegError _ret = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
if (_ret != REG_NO_ERROR)
return _ret;
@@ -435,7 +435,7 @@ RegError REGISTRY_CALLTYPE getValue(RegKeyHandle hKey,
if (keyName->length)
{
ORegKey* pSubKey = 0;
- RegError _ret1 = pKey->openKey(keyName, (RegKeyHandle*)&pSubKey);
+ RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
if (_ret1 != REG_NO_ERROR)
return _ret1;
@@ -474,7 +474,7 @@ RegError REGISTRY_CALLTYPE getLongListValue(RegKeyHandle hKey,
if (keyName->length)
{
ORegKey* pSubKey = 0;
- RegError _ret1 = pKey->openKey(keyName, (RegKeyHandle*)&pSubKey);
+ RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
if (_ret1 != REG_NO_ERROR)
return _ret1;
@@ -513,7 +513,7 @@ RegError REGISTRY_CALLTYPE getStringListValue(RegKeyHandle hKey,
if (keyName->length)
{
ORegKey* pSubKey = 0;
- RegError _ret1 = pKey->openKey(keyName, (RegKeyHandle*)&pSubKey);
+ RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
if (_ret1 != REG_NO_ERROR)
return _ret1;
@@ -550,7 +550,7 @@ RegError REGISTRY_CALLTYPE getUnicodeListValue(RegKeyHandle hKey,
if (keyName->length)
{
ORegKey* pSubKey = 0;
- RegError _ret1 = pKey->openKey(keyName, (RegKeyHandle*)&pSubKey);
+ RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
if (_ret1 != REG_NO_ERROR)
return _ret1;
diff --git a/sal/qa/osl/module/osl_Module.cxx b/sal/qa/osl/module/osl_Module.cxx
index 1612662cbeee..60a336348543 100644
--- a/sal/qa/osl/module/osl_Module.cxx
+++ b/sal/qa/osl/module/osl_Module.cxx
@@ -38,7 +38,8 @@ inline ::rtl::OUString getDllURL( void )
#endif
::rtl::OUString dirPath, dllPath;
- osl::Module::getUrlFromAddress( ( void* ) &getDllURL, dirPath );
+ osl::Module::getUrlFromAddress(
+ reinterpret_cast<oslGenericFunction>(&getDllURL), dirPath);
dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') + 1);
osl::FileBase::getAbsoluteFileURL( dirPath, libPath, dllPath );
@@ -81,7 +82,10 @@ namespace osl_Module
void ctors_name_mode( )
{
OUString aFileURL;
- bRes = osl::Module::getUrlFromAddress( ( void* ) &::osl_Module::testClass::myFunc, aFileURL );
+ bRes = osl::Module::getUrlFromAddress(
+ reinterpret_cast<oslGenericFunction>(
+ &osl_Module::testClass::myFunc),
+ aFileURL);
if ( !( bRes ) )
{
@@ -113,7 +117,10 @@ namespace osl_Module
void getUrlFromAddress_001( )
{
OUString aFileURL;
- bRes = osl::Module::getUrlFromAddress( ( void* ) &::osl_Module::testClass::myFunc, aFileURL ) ;
+ bRes = osl::Module::getUrlFromAddress(
+ reinterpret_cast<oslGenericFunction>(
+ &osl_Module::testClass::myFunc),
+ aFileURL);
if ( !( bRes ) )
{
CPPUNIT_ASSERT_MESSAGE("Cannot locate current module.", false );
@@ -131,7 +138,8 @@ namespace osl_Module
FuncPtr pFunc = ( FuncPtr ) aMod.getSymbol( rtl::OUString("firstfunc") );
OUString aFileURL;
- bRes = osl::Module::getUrlFromAddress( ( void* )pFunc, aFileURL );
+ bRes = osl::Module::getUrlFromAddress(
+ reinterpret_cast<oslGenericFunction>(pFunc), aFileURL);
if ( !( bRes ) )
{
CPPUNIT_ASSERT_MESSAGE("Cannot locate current module.", false );
@@ -214,7 +222,10 @@ namespace osl_Module
void is_001( )
{
OUString aFileURL;
- bRes = osl::Module::getUrlFromAddress( ( void* ) &::osl_Module::testClass::myFunc, aFileURL );
+ bRes = osl::Module::getUrlFromAddress(
+ reinterpret_cast<oslGenericFunction>(
+ osl_Module::testClass::myFunc),
+ aFileURL);
if ( !( bRes ) )
{
CPPUNIT_ASSERT_MESSAGE("Cannot locate current module - using executable instead", false );
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx
index 5a5e8a8c9e4c..a1e5a20fdbbe 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -83,7 +83,8 @@ using ::rtl::OString;
inline ::rtl::OUString getExecutablePath( void )
{
::rtl::OUString dirPath;
- osl::Module::getUrlFromAddress( ( void* ) &getExecutablePath, dirPath );
+ osl::Module::getUrlFromAddress(
+ reinterpret_cast<oslGenericFunction>(&getExecutablePath), dirPath);
dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') );
dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') + 1);
dirPath += rtl::OUString("Executable");
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index 8c85946d6a6c..b5aee739a96d 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -428,7 +428,7 @@ void plugin_shutdown_sys_tray()
if (pMonitor)
{
g_signal_handlers_disconnect_by_func(pMonitor,
- (void*)notify_file_changed, pMonitor);
+ reinterpret_cast<gpointer>(&notify_file_changed), pMonitor);
g_file_monitor_cancel(pMonitor);
g_object_unref(pMonitor);
pMonitor = NULL;
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index a300a258b04b..6d6f35a18d40 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -851,7 +851,7 @@ Reference< XInterface > FactoryImpl::createAdapter(
// map one interface to C++
uno_Interface * pUnoI = &that->m_pInterfaces[ 0 ];
m_aUno2Cpp.mapInterface(
- (void **)&xRet, pUnoI, ::getCppuType( &xRet ) );
+ reinterpret_cast<void **>(&xRet), pUnoI, ::getCppuType( &xRet ) );
that->release();
OSL_ASSERT( xRet.is() );
if (! xRet.is())
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index 721b095693a8..a50fb9931150 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -792,7 +792,7 @@ void AccessController::checkPermission(
// first dynamic check of ac contexts
Reference< XCurrentContext > xContext;
- ::uno_getCurrentContext( (void **)&xContext, s_envType.pData, 0 );
+ ::uno_getCurrentContext( reinterpret_cast<void **>(&xContext), s_envType.pData, 0 );
Reference< security::XAccessControlContext > xACC( getDynamicRestriction( xContext ) );
if (xACC.is())
{
@@ -823,7 +823,7 @@ Any AccessController::doRestricted(
if (xRestriction.is())
{
Reference< XCurrentContext > xContext;
- ::uno_getCurrentContext( (void **)&xContext, s_envType.pData, 0 );
+ ::uno_getCurrentContext( reinterpret_cast<void **>(&xContext), s_envType.pData, 0 );
// override restriction
Reference< XCurrentContext > xNewContext(
@@ -856,7 +856,7 @@ Any AccessController::doPrivileged(
}
Reference< XCurrentContext > xContext;
- ::uno_getCurrentContext( (void **)&xContext, s_envType.pData, 0 );
+ ::uno_getCurrentContext( reinterpret_cast<void **>(&xContext), s_envType.pData, 0 );
Reference< security::XAccessControlContext > xOldRestr(
getDynamicRestriction( xContext ) );
@@ -891,7 +891,7 @@ Reference< security::XAccessControlContext > AccessController::getContext()
}
Reference< XCurrentContext > xContext;
- ::uno_getCurrentContext( (void **)&xContext, s_envType.pData, 0 );
+ ::uno_getCurrentContext( reinterpret_cast<void **>(&xContext), s_envType.pData, 0 );
return acc_Intersection::create(
getDynamicRestriction( xContext ),
diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index 6d341ba33516..b73ea9b65e29 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -732,7 +732,7 @@ static int parseCharMetrics( FileInputStream* fp, FontInfo* fi)
case CODE:
if (!(count < fi->numOfChars))
{
- reallocFontMetrics( (void**)&(fi->cmi),
+ reallocFontMetrics( reinterpret_cast<void**>(&fi->cmi),
&(fi->numOfChars), enlargeCount(fi->numOfChars),
sizeof(CharMetricInfo) );
temp = &(fi->cmi[ count - 1 ]);
@@ -756,7 +756,7 @@ static int parseCharMetrics( FileInputStream* fp, FontInfo* fi)
case CODEHEX:
if (!(count < fi->numOfChars ))
{
- reallocFontMetrics( (void**)&(fi->cmi),
+ reallocFontMetrics( reinterpret_cast<void**>(&fi->cmi),
&(fi->numOfChars), enlargeCount(fi->numOfChars),
sizeof(CharMetricInfo) );
temp = &(fi->cmi[ count - 1 ]);
@@ -841,7 +841,7 @@ static int parseCharMetrics( FileInputStream* fp, FontInfo* fi)
} /* while */
if ((error == ok) && (count != fi->numOfChars))
- error = reallocFontMetrics( (void**)&(fi->cmi), &(fi->numOfChars),
+ error = reallocFontMetrics( reinterpret_cast<void**>(&fi->cmi), &(fi->numOfChars),
count, sizeof(CharMetricInfo) );
if ((error == ok) && (count != fi->numOfChars))
@@ -907,7 +907,7 @@ static int parseTrackKernData( FileInputStream* fp, FontInfo* fi)
case TRACKKERN:
if (!(tcount < fi->numOfTracks))
{
- reallocFontMetrics( (void**)&(fi->tkd), &(fi->numOfTracks),
+ reallocFontMetrics( reinterpret_cast<void**>(&fi->tkd), &(fi->numOfTracks),
enlargeCount(fi->numOfTracks), sizeof(TrackKernData) );
}
@@ -947,7 +947,7 @@ static int parseTrackKernData( FileInputStream* fp, FontInfo* fi)
} /* while */
if (error == ok && tcount != fi->numOfTracks)
- error = reallocFontMetrics( (void**)&(fi->tkd), &(fi->numOfTracks),
+ error = reallocFontMetrics( reinterpret_cast<void**>(&fi->tkd), &(fi->numOfTracks),
tcount, sizeof(TrackKernData) );
if (error == ok && tcount != fi->numOfTracks)
@@ -1013,7 +1013,7 @@ static int parsePairKernData( FileInputStream* fp, FontInfo* fi)
case KERNPAIR:
if (!(pcount < fi->numOfPairs))
{
- reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs),
+ reallocFontMetrics( reinterpret_cast<void**>(&fi->pkd), &(fi->numOfPairs),
enlargeCount(fi->numOfPairs), sizeof(PairKernData) );
}
if (pcount < fi->numOfPairs)
@@ -1037,7 +1037,7 @@ static int parsePairKernData( FileInputStream* fp, FontInfo* fi)
case KERNPAIRXAMT:
if (!(pcount < fi->numOfPairs))
{
- reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs),
+ reallocFontMetrics( reinterpret_cast<void**>(&fi->pkd), &(fi->numOfPairs),
enlargeCount(fi->numOfPairs), sizeof(PairKernData) );
}
if (pcount < fi->numOfPairs)
@@ -1072,7 +1072,7 @@ static int parsePairKernData( FileInputStream* fp, FontInfo* fi)
} /* while */
if ((error == ok) && (pcount != fi->numOfPairs))
- error = reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs),
+ error = reallocFontMetrics( reinterpret_cast<void**>(&fi->pkd), &(fi->numOfPairs),
pcount, sizeof(PairKernData) );
if (error == ok && pcount != fi->numOfPairs)
@@ -1117,7 +1117,7 @@ static int parseCompCharData( FileInputStream* fp, FontInfo* fi)
}
if (ccount > fi->numOfComps)
{
- reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps),
+ reallocFontMetrics( reinterpret_cast<void**>(&fi->ccd), &(fi->numOfComps),
enlargeCount(fi->numOfComps), sizeof(CompCharData) );
}
if (ccount > fi->numOfComps)
@@ -1155,7 +1155,7 @@ static int parseCompCharData( FileInputStream* fp, FontInfo* fi)
case COMPCHAR:
if (!(ccount < fi->numOfComps))
{
- reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps),
+ reallocFontMetrics( reinterpret_cast<void**>(&fi->ccd), &(fi->numOfComps),
enlargeCount(fi->numOfComps), sizeof(CompCharData) );
}
if (ccount < fi->numOfComps)
@@ -1209,7 +1209,7 @@ static int parseCompCharData( FileInputStream* fp, FontInfo* fi)
} /* while */
if (error == ok && ccount != fi->numOfComps)
- reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps),
+ reallocFontMetrics( reinterpret_cast<void**>(&fi->ccd), &(fi->numOfComps),
ccount, sizeof(CompCharData) );
if (error == ok && ccount != fi->numOfComps)
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
index 52a255323c64..2dc978ad0e40 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -647,7 +647,7 @@ bool CUPSManager::endSpool( const OUString& rPrintername, const OUString& rJobTi
// setup cups options
int nNumOptions = 0;
cups_option_t* pOptions = NULL;
- getOptionsFromDocumentSetup( rDocumentJobData, bBanner, nNumOptions, (void**)&pOptions );
+ getOptionsFromDocumentSetup( rDocumentJobData, bBanner, nNumOptions, reinterpret_cast<void**>(&pOptions) );
OString sJobName(OUStringToOString(rJobTitle, aEnc));