summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-28 19:04:53 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-28 19:09:22 +0100
commitba868c28a34d467bb800fd27bd2a43c8d8ea1753 (patch)
tree64501c39d1682cae3ed13a09e6073a8b6ef213cd /jvmfwk
parent88d7938ade37c9b7c4fccb0678ce38403d023764 (diff)
Clean up C-style casts from pointers to void
Change-Id: I302d313f2d14d908672d4534aad1818e820eaae4
Diffstat (limited to 'jvmfwk')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx4
-rw-r--r--jvmfwk/source/elements.cxx10
-rw-r--r--jvmfwk/source/framework.cxx6
3 files changed, 10 insertions, 10 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index dde0d760f59b..18c72806b55b 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -145,7 +145,7 @@ OString getPluginJarPath(
JavaInfo* createJavaInfo(const rtl::Reference<VendorBase> & info)
{
- JavaInfo* pInfo = (JavaInfo*) rtl_allocateMemory(sizeof(JavaInfo));
+ JavaInfo* pInfo = static_cast<JavaInfo*>(rtl_allocateMemory(sizeof(JavaInfo)));
if (pInfo == NULL)
return NULL;
OUString sVendor = info->getVendor();
@@ -351,7 +351,7 @@ javaPluginError jfw_plugin_getAllJavaInfos(
}
//Now vecVerifiedInfos contains all those JREs which meet the version requirements
//Transfer them into the array that is passed out.
- arInfo = (JavaInfo**) rtl_allocateMemory(vecVerifiedInfos.size() * sizeof (JavaInfo*));
+ arInfo = static_cast<JavaInfo**>(rtl_allocateMemory(vecVerifiedInfos.size() * sizeof (JavaInfo*)));
int j = 0;
typedef vector<rtl::Reference<VendorBase> >::const_iterator cit;
for (cit ii = vecVerifiedInfos.begin(); ii != vecVerifiedInfos.end(); ++ii, ++j)
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index 4604c073f0c8..03269123c6d0 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -979,7 +979,7 @@ JavaInfo * CNodeJavaInfo::makeJavaInfo() const
{
if (bNil == true || m_bEmptyNode == true)
return NULL;
- JavaInfo * pInfo = (JavaInfo*) rtl_allocateMemory(sizeof(JavaInfo));
+ JavaInfo * pInfo = static_cast<JavaInfo*>(rtl_allocateMemory(sizeof(JavaInfo)));
if (pInfo == NULL)
return NULL;
memset(pInfo, 0, sizeof(JavaInfo));
@@ -1075,8 +1075,8 @@ void MergedSettings::getVmParametersArray(
osl::MutexGuard guard(FwkMutex::get());
OSL_ASSERT(parParams != NULL && size != NULL);
- *parParams = (rtl_uString **)
- rtl_allocateMemory(sizeof(rtl_uString*) * m_vmParams.size());
+ *parParams = static_cast<rtl_uString **>(
+ rtl_allocateMemory(sizeof(rtl_uString*) * m_vmParams.size()));
if (*parParams == NULL)
return;
@@ -1097,8 +1097,8 @@ void MergedSettings::getJRELocations(
osl::MutexGuard guard(FwkMutex::get());
assert(parLocations != NULL && size != NULL);
- *parLocations = (rtl_uString **)
- rtl_allocateMemory(sizeof(rtl_uString*) * m_JRELocations.size());
+ *parLocations = static_cast<rtl_uString **>(
+ rtl_allocateMemory(sizeof(rtl_uString*) * m_JRELocations.size()));
if (*parLocations == NULL)
return;
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 1e1ba9adb6dd..e621e0e536b8 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -171,8 +171,8 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
}
//create an fill the array of JavaInfo*
sal_Int32 nSize = vecInfo.size() + vecInfoManual2.size();
- *pparInfo = (JavaInfo**) rtl_allocateMemory(
- nSize * sizeof(JavaInfo*));
+ *pparInfo = static_cast<JavaInfo**>(rtl_allocateMemory(
+ nSize * sizeof(JavaInfo*)));
if (*pparInfo == NULL)
return JFW_E_ERROR;
@@ -1111,7 +1111,7 @@ JavaInfo * CJavaInfo::copyJavaInfo(const JavaInfo * pInfo)
if (pInfo == NULL)
return NULL;
JavaInfo* newInfo =
- (JavaInfo*) rtl_allocateMemory(sizeof(JavaInfo));
+ static_cast<JavaInfo*>(rtl_allocateMemory(sizeof(JavaInfo)));
if (newInfo)
{
memcpy(newInfo, pInfo, sizeof(JavaInfo));