summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-22 13:11:34 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-23 07:54:51 +0100
commit9af8f190ed1bf3f76897ad0c078db16451d6fb69 (patch)
tree015089ee72a67eca7db999845cabb8104c8ce3aa /xmlsecurity
parent9602e63c818722c3910343b7af53917d031861c8 (diff)
More loplugin:cstylecast on Windows
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862 Reviewed-on: https://gerrit.libreoffice.org/48317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx
index 54eaafbfc036..4b6ef98cf905 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx
@@ -71,7 +71,7 @@ css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl:
auto arrCertAltNameEntry = std::unique_ptr<CertAltNameEntry[]>(new CertAltNameEntry[subjectName->cAltEntry]);
- for (unsigned int i = 0; i < (unsigned int)subjectName->cAltEntry; i++){
+ for (unsigned int i = 0; i < static_cast<unsigned int>(subjectName->cAltEntry); i++){
PCERT_ALT_NAME_ENTRY pEntry = &subjectName->rgAltEntry[i];
switch(pEntry->dwAltNameChoice) {
@@ -84,7 +84,7 @@ css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl:
otherNameProp.Name = OUString::createFromAscii(pOtherName->pszObjId);
Sequence< sal_Int8 > otherName( pOtherName->Value.cbData ) ;
- for( unsigned int n = 0; n < (unsigned int) pOtherName->Value.cbData ; n ++ )
+ for( unsigned int n = 0; n < static_cast<unsigned int>(pOtherName->Value.cbData) ; n ++ )
otherName[n] = *( pOtherName->Value.pbData + n ) ;
otherNameProp.Value <<= otherName;
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index 3ec06fc0182c..45fa3606fd9e 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -756,7 +756,7 @@ Reference< XCertificate > SecurityEnvironment_MSCryptImpl::createCertificateFrom
OString oscert = OUStringToOString( asciiCertificate , RTL_TEXTENCODING_ASCII_US ) ;
- chCert = xmlStrndup( reinterpret_cast<const xmlChar*>(oscert.getStr()), ( int )oscert.getLength() ) ;
+ chCert = xmlStrndup( reinterpret_cast<const xmlChar*>(oscert.getStr()), static_cast<int>(oscert.getLength()) ) ;
certSize = xmlSecBase64Decode( chCert, chCert, xmlStrlen( chCert ) ) ;
diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
index 07a769ac99cf..d1e6a7752449 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
@@ -186,7 +186,7 @@ X509Certificate_MSCryptImpl::~X509Certificate_MSCryptImpl() {
//Methods from XCertificate
sal_Int16 SAL_CALL X509Certificate_MSCryptImpl::getVersion() {
if( m_pCertContext != nullptr && m_pCertContext->pCertInfo != nullptr ) {
- return ( char )m_pCertContext->pCertInfo->dwVersion ;
+ return static_cast<char>(m_pCertContext->pCertInfo->dwVersion) ;
} else {
return -1 ;
}