summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-28 19:08:48 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-28 19:09:29 +0100
commit51a705c439ef2074120f276cce641d8e21768e8f (patch)
tree21e615da399d2c1a45ac9a13176e258f4ff59d55 /xmlsecurity
parentb51252247ef9b53fea133aaa801e662369f71ea4 (diff)
Clean up C-style casts from pointers to void
Change-Id: I112f4df678d9f3e70df7782443c860f930909e33
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx10
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/saxhelper.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/xmlstreamio.cxx4
4 files changed, 9 insertions, 9 deletions
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index d4f0f5a22d7e..309a29a6bbf2 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -158,7 +158,7 @@ void CertificateViewerDetailsTP::Clear( void )
SvTreeListEntry* pEntry = m_pElementsLB->GetEntry( i );
while( pEntry )
{
- delete ( Details_UserDatat* ) pEntry->GetUserData();
+ delete static_cast<Details_UserDatat*>(pEntry->GetUserData());
++i;
pEntry = m_pElementsLB->GetEntry( i );
}
@@ -271,7 +271,7 @@ IMPL_LINK_NOARG(CertificateViewerDetailsTP, ElementSelectHdl)
bool bFixedWidthFont;
if( pEntry )
{
- const Details_UserDatat* p = ( Details_UserDatat* ) pEntry->GetUserData();
+ const Details_UserDatat* p = static_cast<Details_UserDatat*>(pEntry->GetUserData());
aElementText = p->maTxt;
bFixedWidthFont = p->mbFixedWidthFont;
}
@@ -370,7 +370,7 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, ViewCertHdl)
SvTreeListEntry* pEntry = mpCertPathLB->FirstSelected();
if( pEntry )
{
- CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, ((CertPath_UserData*)pEntry->GetUserData())->mxCert, false );
+ CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, static_cast<CertPath_UserData*>(pEntry->GetUserData())->mxCert, false );
aViewer.Execute();
}
@@ -383,7 +383,7 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, CertSelectHdl)
SvTreeListEntry* pEntry = mpCertPathLB->FirstSelected();
if( pEntry )
{
- CertPath_UserData* pData = (CertPath_UserData*) pEntry->GetUserData();
+ CertPath_UserData* pData = static_cast<CertPath_UserData*>(pEntry->GetUserData());
if ( pData )
sStatus = pData->mbValid ? msCertOK : msCertNotValidated;
}
@@ -400,7 +400,7 @@ void CertificateViewerCertPathTP::Clear( void )
SvTreeListEntry* pEntry = mpCertPathLB->GetEntry( i );
while( pEntry )
{
- delete ( CertPath_UserData* ) pEntry->GetUserData();
+ delete static_cast<CertPath_UserData*>(pEntry->GetUserData());
++i;
pEntry = mpCertPathLB->GetEntry( i );
}
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index 0355e27bb7a6..ceb628927fc6 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -97,7 +97,7 @@ char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* /*arg*/ )
pPasswordRequest->getPassword(),
osl_getThreadTextEncoding()));
sal_Int32 nLen = aPassword.getLength();
- char* pPassword = (char*) PORT_Alloc( nLen+1 ) ;
+ char* pPassword = static_cast<char*>(PORT_Alloc( nLen+1 ) );
pPassword[nLen] = 0;
memcpy( pPassword, aPassword.getStr(), nLen );
return pPassword;
diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx
index cd15cc6dbe3e..075167865815 100644
--- a/xmlsecurity/source/xmlsec/saxhelper.cxx
+++ b/xmlsecurity/source/xmlsec/saxhelper.cxx
@@ -67,7 +67,7 @@ const xmlChar** attrlist_to_nxmlstr( const cssu::Sequence< cssxcsax::XMLAttribut
if( nLength != 0 )
{
- attrs = ( const xmlChar** )xmlMalloc( ( nLength * 2 + 2 ) * sizeof( xmlChar* ) ) ;
+ attrs = static_cast<const xmlChar**>(xmlMalloc( ( nLength * 2 + 2 ) * sizeof( xmlChar* ) ));
}
else
{
diff --git a/xmlsecurity/source/xmlsec/xmlstreamio.cxx b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
index 8223a9f1ad79..1034e8bde594 100644
--- a/xmlsecurity/source/xmlsec/xmlstreamio.cxx
+++ b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
@@ -116,7 +116,7 @@ int xmlStreamRead( void* context, char* buffer, int len )
if( ( enableXmlStreamIO & XMLSTREAMIO_INITIALIZED ) &&
( enableXmlStreamIO & XMLSTREAMIO_REGISTERED ) ) {
if( context != NULL ) {
- xInputStream = ( com::sun::star::io::XInputStream* )context ;
+ xInputStream = static_cast<com::sun::star::io::XInputStream*>(context);
if( !xInputStream.is() )
return 0 ;
@@ -137,7 +137,7 @@ int xmlStreamClose( void * context )
( enableXmlStreamIO & XMLSTREAMIO_REGISTERED ) ) {
if( context != NULL ) {
::com::sun::star::io::XInputStream* pInputStream ;
- pInputStream = ( ::com::sun::star::io::XInputStream* )context ;
+ pInputStream = static_cast<css::io::XInputStream*>(context);
pInputStream->release() ;
}
}