summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-31 13:12:15 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-03-31 13:12:15 +0200
commit26655d0909e649f7d7ceb5e5cbb9a26fdc6753b6 (patch)
tree5fa055094420ac0befb980af1ef8ab26a5873e44 /bridges
parent14a4390b8711f1c01d20b23f179a4c88db87e5b1 (diff)
Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I19b86fba87df57c4c65c658d051b664c527214eb
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx10
-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.cxx4
-rw-r--r--bridges/source/cpp_uno/shared/bridge.cxx4
-rw-r--r--bridges/source/cpp_uno/shared/component.cxx6
-rw-r--r--bridges/source/cpp_uno/shared/unointerfaceproxy.cxx2
-rw-r--r--bridges/source/jni_uno/jni_java2uno.cxx4
-rw-r--r--bridges/source/jni_uno/jni_uno2java.cxx10
9 files changed, 23 insertions, 23 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx
index bdcc8183f56a..36de6daa6f14 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx
@@ -306,7 +306,7 @@ void x86_64::fill_struct( typelib_TypeDescriptionReference *pTypeRef, const sal_
n = classify_argument( pTypeRef, classes, 0 );
- sal_uInt64 *pStructAlign = reinterpret_cast<sal_uInt64 *>( pStruct );
+ sal_uInt64 *pStructAlign = static_cast<sal_uInt64 *>( pStruct );
for ( n--; n >= 0; n-- )
switch ( classes[n] )
{
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
index 81547d7ff7ae..bfa7c0e77f67 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
@@ -125,25 +125,25 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
{
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
- *reinterpret_cast<sal_uInt64 *>( pRegisterReturn ) = data.rax;
+ *static_cast<sal_uInt64 *>( pRegisterReturn ) = data.rax;
break;
case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG:
case typelib_TypeClass_ENUM:
- *reinterpret_cast<sal_uInt32 *>( pRegisterReturn ) = *reinterpret_cast<sal_uInt32*>( &data.rax );
+ *static_cast<sal_uInt32 *>( pRegisterReturn ) = *reinterpret_cast<sal_uInt32*>( &data.rax );
break;
case typelib_TypeClass_CHAR:
case typelib_TypeClass_SHORT:
case typelib_TypeClass_UNSIGNED_SHORT:
- *reinterpret_cast<sal_uInt16 *>( pRegisterReturn ) = *reinterpret_cast<sal_uInt16*>( &data.rax );
+ *static_cast<sal_uInt16 *>( pRegisterReturn ) = *reinterpret_cast<sal_uInt16*>( &data.rax );
break;
case typelib_TypeClass_BOOLEAN:
case typelib_TypeClass_BYTE:
- *reinterpret_cast<sal_uInt8 *>( pRegisterReturn ) = *reinterpret_cast<sal_uInt8*>( &data.rax );
+ *static_cast<sal_uInt8 *>( pRegisterReturn ) = *reinterpret_cast<sal_uInt8*>( &data.rax );
break;
case typelib_TypeClass_FLOAT:
case typelib_TypeClass_DOUBLE:
- *reinterpret_cast<double *>( pRegisterReturn ) = data.xmm0;
+ *static_cast<double *>( pRegisterReturn ) = data.xmm0;
break;
default:
{
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 3da87f2b91ab..5151cc52a5b5 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -339,7 +339,7 @@ typelib_TypeClass cpp_vtable_call(
case 0: // queryInterface() opt
{
typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, reinterpret_cast<Type *>( gpreg[2] )->getTypeLibType() );
+ TYPELIB_DANGER_GET( &pTD, static_cast<Type *>( gpreg[2] )->getTypeLibType() );
if ( pTD )
{
XInterface * pInterface = 0;
@@ -351,7 +351,7 @@ typelib_TypeClass cpp_vtable_call(
if ( pInterface )
{
- ::uno_any_construct( reinterpret_cast<uno_Any *>( gpreg[0] ),
+ ::uno_any_construct( static_cast<uno_Any *>( gpreg[0] ),
&pInterface, pTD, cpp_acquire );
pInterface->release();
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 d5cf312a754d..4b4e935c2f98 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -412,7 +412,7 @@ void unoInterfaceProxyDispatch(
case 0: // queryInterface() opt
{
typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pArgs[0] )->getTypeLibType() );
+ TYPELIB_DANGER_GET( &pTD, static_cast< Type * >( pArgs[0] )->getTypeLibType() );
if (pTD)
{
uno_Interface * pInterface = 0;
@@ -423,7 +423,7 @@ void unoInterfaceProxyDispatch(
if (pInterface)
{
::uno_any_construct(
- reinterpret_cast< uno_Any * >( pReturn ),
+ static_cast< uno_Any * >( pReturn ),
&pInterface, pTD, 0 );
(*pInterface->release)( pInterface );
TYPELIB_DANGER_RELEASE( pTD );
diff --git a/bridges/source/cpp_uno/shared/bridge.cxx b/bridges/source/cpp_uno/shared/bridge.cxx
index 5ee05b3d4ad4..43a4c3f307db 100644
--- a/bridges/source/cpp_uno/shared/bridge.cxx
+++ b/bridges/source/cpp_uno/shared/bridge.cxx
@@ -56,8 +56,8 @@ void cpp2unoMapping(
assert(ppUnoI && pTypeDescr);
if (*ppUnoI)
{
- (*reinterpret_cast< uno_Interface * >( *ppUnoI )->release)(
- reinterpret_cast< uno_Interface * >( *ppUnoI ) );
+ (*static_cast< uno_Interface * >( *ppUnoI )->release)(
+ static_cast< uno_Interface * >( *ppUnoI ) );
*ppUnoI = 0;
}
if (pCppI)
diff --git a/bridges/source/cpp_uno/shared/component.cxx b/bridges/source/cpp_uno/shared/component.cxx
index 818841d27ec5..0dc2c0856270 100644
--- a/bridges/source/cpp_uno/shared/component.cxx
+++ b/bridges/source/cpp_uno/shared/component.cxx
@@ -100,7 +100,7 @@ static void s_stub_computeObjectIdentifier(va_list * pParam)
{
::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > xHome(
- reinterpret_cast< ::com::sun::star::uno::XInterface * >(
+ static_cast< ::com::sun::star::uno::XInterface * >(
pInterface ),
::com::sun::star::uno::UNO_QUERY );
assert(xHome.is() && "### query to XInterface failed!");
@@ -142,7 +142,7 @@ static void s_stub_acquireInterface(va_list * pParam)
/*uno_ExtEnvironment * pExtEnv = */va_arg(*pParam, uno_ExtEnvironment *);
void * pCppI = va_arg(*pParam, void *);
- reinterpret_cast< ::com::sun::star::uno::XInterface * >( pCppI )->acquire();
+ static_cast< ::com::sun::star::uno::XInterface * >( pCppI )->acquire();
}
static void SAL_CALL acquireInterface( uno_ExtEnvironment * pExtEnv, void * pCppI )
@@ -155,7 +155,7 @@ static void s_stub_releaseInterface(va_list * pParam)
/*uno_ExtEnvironment * pExtEnv = */va_arg(*pParam, uno_ExtEnvironment *);
void * pCppI = va_arg(*pParam, void *);
- reinterpret_cast< ::com::sun::star::uno::XInterface * >( pCppI )->release();
+ static_cast< ::com::sun::star::uno::XInterface * >( pCppI )->release();
}
static void SAL_CALL releaseInterface( uno_ExtEnvironment * pExtEnv, void * pCppI )
diff --git a/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx b/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
index df6dcb34b9fb..6b7aae26649e 100644
--- a/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
+++ b/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
@@ -32,7 +32,7 @@ void freeUnoInterfaceProxy(uno_ExtEnvironment * pEnv, void * pProxy)
{
UnoInterfaceProxy * pThis =
static_cast< UnoInterfaceProxy * >(
- reinterpret_cast< uno_Interface * >( pProxy ) );
+ static_cast< uno_Interface * >( pProxy ) );
if (pEnv != pThis->pBridge->getUnoEnv()) {
assert(false);
}
diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx
index cde61c4ce8d0..47064670c376 100644
--- a/bridges/source/jni_uno/jni_java2uno.cxx
+++ b/bridges/source/jni_uno/jni_java2uno.cxx
@@ -94,14 +94,14 @@ void Bridge::handle_uno_exc( JNI_context const & jni, uno_Any * uno_exc ) const
{
#if OSL_DEBUG_LEVEL > 0
// append java stack trace to Message member
- reinterpret_cast< ::com::sun::star::uno::Exception * >(
+ static_cast< ::com::sun::star::uno::Exception * >(
uno_exc->pData )->Message += jni.get_stack_trace();
#endif
SAL_INFO(
"bridges",
"exception occurred java->uno: ["
<< OUString::unacquired(&uno_exc->pType->pTypeName) << "] "
- << reinterpret_cast<css::uno::Exception const *>(
+ << static_cast<css::uno::Exception const *>(
uno_exc->pData)->Message);
// signal exception
jvalue java_exc;
diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx
index 7d690da59d07..88497b562652 100644
--- a/bridges/source/jni_uno/jni_uno2java.cxx
+++ b/bridges/source/jni_uno/jni_uno2java.cxx
@@ -114,7 +114,7 @@ void Bridge::handle_java_exc(
SAL_INFO(
"bridges",
"exception occurred uno->java: [" << exc_name << "] "
- << (reinterpret_cast<css::uno::Exception const *>(uno_exc->pData)
+ << (static_cast<css::uno::Exception const *>(uno_exc->pData)
->Message));
}
@@ -520,7 +520,7 @@ extern "C"
void SAL_CALL UNO_proxy_free( uno_ExtEnvironment * env, void * proxy )
SAL_THROW_EXTERN_C()
{
- UNO_proxy * that = reinterpret_cast< UNO_proxy * >( proxy );
+ UNO_proxy * that = static_cast< UNO_proxy * >( proxy );
Bridge const * bridge = that->m_bridge;
assert(env == bridge->m_uno_env); (void) env;
@@ -655,7 +655,7 @@ void SAL_CALL UNO_proxy_dispatch(
case 0: // queryInterface()
{
TypeDescr demanded_td(
- *reinterpret_cast< typelib_TypeDescriptionReference ** >(
+ *static_cast< typelib_TypeDescriptionReference ** >(
uno_args[ 0 ] ) );
if (typelib_TypeClass_INTERFACE !=
demanded_td.get()->eTypeClass)
@@ -733,7 +733,7 @@ void SAL_CALL UNO_proxy_dispatch(
else // object does not support demanded interface
{
uno_any_construct(
- reinterpret_cast< uno_Any * >( uno_ret ),
+ static_cast< uno_Any * >( uno_ret ),
0, 0, 0 );
}
// no exception occurred
@@ -743,7 +743,7 @@ void SAL_CALL UNO_proxy_dispatch(
else
{
uno_any_construct(
- reinterpret_cast< uno_Any * >( uno_ret ),
+ static_cast< uno_Any * >( uno_ret ),
&pInterface, demanded_td.get(), 0 );
(*pInterface->release)( pInterface );
*uno_exc = 0;