summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-29 14:48:05 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-03-29 14:48:05 +0200
commit66f0c17d244cdc8d5a96ca3fe97aef68b45ad0cc (patch)
tree253a116b4ba4037c908d42a7fcd2474cdd14bdc9 /bridges
parentec0e0809af73e49e46c66f2349cbbf13362b3120 (diff)
loplugin:cstylecast
Change-Id: I7fd4ec85eac0693ae6a61ba0b854dd6091bdc6ef
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx6
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx8
4 files changed, 11 insertions, 11 deletions
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
index 7b49e23d7560..86a81dc8c4e7 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
@@ -75,7 +75,7 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
data.nFPR = nFPR;
// Get pointer to method
- sal_uInt64 pMethod = *((sal_uInt64 *)pThis);
+ sal_uInt64 pMethod = *static_cast<sal_uInt64 *>(pThis);
pMethod += 8 * nVtableIndex;
data.pMethod = *reinterpret_cast<sal_uInt64 *>(pMethod);
@@ -84,7 +84,7 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
{
// 16-bytes aligned
sal_uInt32 nStackBytes = ( ( nStack + 1 ) >> 1 ) * 16;
- sal_uInt64 *pCallStack = (sal_uInt64 *) __builtin_alloca( nStackBytes );
+ sal_uInt64 *pCallStack = static_cast<sal_uInt64 *>(__builtin_alloca( nStackBytes ));
std::memcpy( pCallStack, pStack, nStackBytes );
}
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx
index 259aff795031..ae877ac31012 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx
@@ -94,12 +94,12 @@ static typelib_TypeClass cpp2uno_call(
// stack space
// parameters
- void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
+ void ** pUnoArgs = static_cast<void **>(alloca( 4 * sizeof(void *) * nParams ));
void ** pCppArgs = pUnoArgs + nParams;
// indices of values this have to be converted (interface conversion cpp<=>uno)
- sal_Int32 * pTempIndices = (sal_Int32 *)(pUnoArgs + (2 * nParams));
+ sal_Int32 * pTempIndices = reinterpret_cast<sal_Int32 *>(pUnoArgs + (2 * nParams));
// type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
+ typelib_TypeDescription ** ppTempParamTypeDescr = reinterpret_cast<typelib_TypeDescription **>(pUnoArgs + (3 * nParams));
sal_Int32 nTempIndices = 0;
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
index 7132c4673370..34ab8fea2c50 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
@@ -193,7 +193,7 @@ std::type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr )
buf.append( 'E' );
OString symName( buf.makeStringAndClear() );
- rtti = (std::type_info *)dlsym( m_hApp, symName.getStr() );
+ rtti = static_cast<std::type_info *>(dlsym( m_hApp, symName.getStr() ));
if (rtti)
{
@@ -254,7 +254,7 @@ std::type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr )
static void deleteException( void * pExc )
{
- __cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
+ __cxa_exception const * header = static_cast<__cxa_exception const *>(pExc) - 1;
typelib_TypeDescription * pTD = 0;
OUString unoName( toUNOname( header->exceptionType->name() ) );
::typelib_typedescription_getByName( &pTD, unoName.pData );
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
index a90d0304be58..1e3e11894de5 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
@@ -100,7 +100,7 @@ static void cpp_call(
{
// Maxium space for [complex ret ptr], values | ptr ...
// (but will be used less - some of the values will be in pGPR and pFPR)
- sal_uInt64 *pStack = (sal_uInt64 *)__builtin_alloca( (nParams + 3) * sizeof(sal_uInt64) );
+ sal_uInt64 *pStack = static_cast<sal_uInt64 *>(__builtin_alloca( (nParams + 3) * sizeof(sal_uInt64) ));
sal_uInt64 *pStackStart = pStack;
sal_uInt64 pGPR[x86_64::MAX_GPR_REGS];
@@ -138,11 +138,11 @@ static void cpp_call(
INSERT_INT64( &pAdjustedThisPtr, nGPR, pGPR, pStack );
// Args
- void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams );
+ void ** pCppArgs = static_cast<void **>(alloca( 3 * sizeof(void *) * nParams ));
// Indices of values this have to be converted (interface conversion cpp<=>uno)
- sal_Int32 * pTempIndices = (sal_Int32 *)(pCppArgs + nParams);
+ sal_Int32 * pTempIndices = reinterpret_cast<sal_Int32 *>(pCppArgs + nParams);
// Type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
+ typelib_TypeDescription ** ppTempParamTypeDescr = reinterpret_cast<typelib_TypeDescription **>(pCppArgs + (2 * nParams));
sal_Int32 nTempIndices = 0;