From 0b6a0d4c3184794711e25d06b42a4be171c139a6 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 30 Oct 2015 13:28:47 +0100 Subject: bridges: loplugin:cstylecast Change-Id: I8613f1f7f2155aa972fa4f841ebfcf6e07e45821 --- .../source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx | 12 ++++++------ bridges/source/cpp_uno/gcc3_linux_intel/except.cxx | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx index af2080658460..94d94d864b9c 100644 --- a/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx @@ -106,26 +106,26 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod( break; case typelib_TypeClass_HYPER: case typelib_TypeClass_UNSIGNED_HYPER: - ((long*)pRegisterReturn)[1] = edx; + static_cast(pRegisterReturn)[1] = edx; case typelib_TypeClass_LONG: case typelib_TypeClass_UNSIGNED_LONG: case typelib_TypeClass_CHAR: case typelib_TypeClass_ENUM: - ((long*)pRegisterReturn)[0] = eax; + static_cast(pRegisterReturn)[0] = eax; break; case typelib_TypeClass_SHORT: case typelib_TypeClass_UNSIGNED_SHORT: - *(unsigned short*)pRegisterReturn = eax; + *static_cast(pRegisterReturn) = eax; break; case typelib_TypeClass_BOOLEAN: case typelib_TypeClass_BYTE: - *(unsigned char*)pRegisterReturn = eax; + *static_cast(pRegisterReturn) = eax; break; case typelib_TypeClass_FLOAT: - asm ( "fstps %0" : : "m"(*(char *)pRegisterReturn) ); + asm ( "fstps %0" : : "m"(*static_cast(pRegisterReturn)) ); break; case typelib_TypeClass_DOUBLE: - asm ( "fstpl %0\n\t" : : "m"(*(char *)pRegisterReturn) ); + asm ( "fstpl %0\n\t" : : "m"(*static_cast(pRegisterReturn)) ); break; default: { diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx index f26e4eacce14..61ae30732762 100644 --- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx @@ -168,7 +168,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) { // ensure availability of base type_info * base_rtti = getRTTI( - (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription ); + pTypeDescr->pBaseTypeDescription); rtti = new __si_class_type_info( strdup( rttiName ), static_cast<__class_type_info *>(base_rtti) ); } @@ -257,7 +257,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) #endif } } - rtti = (type_info *)s_rtti->getRTTI( reinterpret_cast(pTypeDescr) ); + rtti = s_rtti->getRTTI(reinterpret_cast(pTypeDescr)); TYPELIB_DANGER_RELEASE( pTypeDescr ); assert(rtti && "### no rtti for throwing exception!"); if (! rtti) -- cgit