From 9af8f190ed1bf3f76897ad0c078db16451d6fb69 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 22 Jan 2018 13:11:34 +0100 Subject: 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 Reviewed-by: Stephan Bergmann --- xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx | 4 ++-- xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx | 2 +- xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'xmlsecurity') 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(new CertAltNameEntry[subjectName->cAltEntry]); - for (unsigned int i = 0; i < (unsigned int)subjectName->cAltEntry; i++){ + for (unsigned int i = 0; i < static_cast(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(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(oscert.getStr()), ( int )oscert.getLength() ) ; + chCert = xmlStrndup( reinterpret_cast(oscert.getStr()), static_cast(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(m_pCertContext->pCertInfo->dwVersion) ; } else { return -1 ; } -- cgit