summaryrefslogtreecommitdiff
path: root/cppu/source/helper
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-01-29 10:48:57 +0100
committersb <sb@openoffice.org>2010-01-29 10:48:57 +0100
commitd127b5cb9d58aad37986c51267b8e911ebf2f69c (patch)
tree5211ff31f5bca81f3fd4f326dc86f0890bcb9f7c /cppu/source/helper
parentba9e7dbf9c1130df228e9324c8a0225d34443150 (diff)
sb119: #i108654# avoid casts that are not strict-aliasing safe (patch by cmc)
Diffstat (limited to 'cppu/source/helper')
-rw-r--r--cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx20
1 files changed, 12 insertions, 8 deletions
diff --git a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
index 630a42bea82f..dbe7707a7aab 100644
--- a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
+++ b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
@@ -278,10 +278,12 @@ static uno::TypeDescription getAcquireMethod(void)
typelib_TypeDescriptionReference * type_XInterface =
* typelib_static_type_getByTypeClass(typelib_TypeClass_INTERFACE);
- typelib_InterfaceTypeDescription * pTXInterfaceDescr = 0;
- TYPELIB_DANGER_GET ((typelib_TypeDescription **)&pTXInterfaceDescr, type_XInterface);
- uno::TypeDescription acquire(pTXInterfaceDescr->ppAllMembers[1]);
- TYPELIB_DANGER_RELEASE((typelib_TypeDescription *)pTXInterfaceDescr);
+ typelib_TypeDescription * pTXInterfaceDescr = 0;
+ TYPELIB_DANGER_GET (&pTXInterfaceDescr, type_XInterface);
+ uno::TypeDescription acquire(
+ reinterpret_cast< typelib_InterfaceTypeDescription * >(
+ pTXInterfaceDescr)->ppAllMembers[1]);
+ TYPELIB_DANGER_RELEASE(pTXInterfaceDescr);
return acquire;
}
@@ -291,10 +293,12 @@ static uno::TypeDescription getReleaseMethod(void)
typelib_TypeDescriptionReference * type_XInterface =
* typelib_static_type_getByTypeClass(typelib_TypeClass_INTERFACE);
- typelib_InterfaceTypeDescription * pTXInterfaceDescr = 0;
- TYPELIB_DANGER_GET ((typelib_TypeDescription **)&pTXInterfaceDescr, type_XInterface);
- uno::TypeDescription release(pTXInterfaceDescr->ppAllMembers[2]);
- TYPELIB_DANGER_RELEASE((typelib_TypeDescription *)pTXInterfaceDescr);
+ typelib_TypeDescription * pTXInterfaceDescr = 0;
+ TYPELIB_DANGER_GET (&pTXInterfaceDescr, type_XInterface);
+ uno::TypeDescription release(
+ reinterpret_cast< typelib_InterfaceTypeDescription * >(
+ pTXInterfaceDescr)->ppAllMembers[2]);
+ TYPELIB_DANGER_RELEASE(pTXInterfaceDescr);
return release;
}