Clean up C-style casts from pointers to void
Change-Id: I302d313f2d14d908672d4534aad1818e820eaae4
This commit is contained in:
@@ -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)
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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));
|
||||
|
Reference in New Issue
Block a user