diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-14 16:55:51 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-16 14:19:16 +0000 |
commit | d11ac6045926d4c6e392b3797939fbb7c7d37b27 (patch) | |
tree | b6b99803b11f8f9d84bba39ee2d38430c4f59c69 /extensions/source/config | |
parent | 099ef29c47970d4b9d20f31d0ccbef93c492226b (diff) |
clang-cl loplugin: extensions
Change-Id: I659d8a3b098c7417235006c86ea60e7fe1e56a44
Reviewed-on: https://gerrit.libreoffice.org/29867
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'extensions/source/config')
-rw-r--r-- | extensions/source/config/ldap/ldapaccess.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx index a1f28f0fb326..65ecc4e33dd5 100644 --- a/extensions/source/config/ldap/ldapaccess.cxx +++ b/extensions/source/config/ldap/ldapaccess.cxx @@ -134,8 +134,8 @@ void LdapConnection::connectSimple() // Do the bind #ifdef _WIN32 LdapErrCode retCode = ldap_simple_bind_sW(mConnection, - (PWCHAR) mLdapDefinition.mAnonUser.getStr(), - (PWCHAR) mLdapDefinition.mAnonCredentials.getStr() ); + const_cast<sal_Unicode *>(mLdapDefinition.mAnonUser.getStr()), + const_cast<sal_Unicode *>(mLdapDefinition.mAnonCredentials.getStr()) ); #else LdapErrCode retCode = ldap_simple_bind_s(mConnection, OUStringToOString( mLdapDefinition.mAnonUser, RTL_TEXTENCODING_UTF8 ).getStr(), @@ -160,7 +160,7 @@ void LdapConnection::initConnection() if (mLdapDefinition.mPort == 0) mLdapDefinition.mPort = LDAP_PORT; #ifdef _WIN32 - mConnection = ldap_initW((PWCHAR) mLdapDefinition.mServer.getStr(), + mConnection = ldap_initW(const_cast<sal_Unicode *>(mLdapDefinition.mServer.getStr()), mLdapDefinition.mPort) ; #else mConnection = ldap_init(OUStringToOString( mLdapDefinition.mServer, RTL_TEXTENCODING_UTF8 ).getStr(), @@ -191,10 +191,10 @@ void LdapConnection::initConnection() LdapMessageHolder result; #ifdef _WIN32 LdapErrCode retCode = ldap_search_sW(mConnection, - (PWCHAR) aUserDn.getStr(), + const_cast<sal_Unicode *>(aUserDn.getStr()), LDAP_SCOPE_BASE, const_cast<PWCHAR>( L"(objectclass=*)" ), - 0, + nullptr, 0, // Attributes + values &result.msg) ; #else @@ -258,11 +258,11 @@ void LdapConnection::initConnection() LdapMessageHolder result; #ifdef _WIN32 - PWCHAR attributes [2] = { const_cast<PWCHAR>( L"1.1" ), NULL }; + PWCHAR attributes [2] = { const_cast<PWCHAR>( L"1.1" ), nullptr }; LdapErrCode retCode = ldap_search_sW(mConnection, - (PWCHAR) mLdapDefinition.mBaseDN.getStr(), + const_cast<sal_Unicode *>(mLdapDefinition.mBaseDN.getStr()), LDAP_SCOPE_SUBTREE, - (PWCHAR) filter.makeStringAndClear().getStr(), attributes, 0, &result.msg) ; + const_cast<sal_Unicode *>(filter.makeStringAndClear().getStr()), attributes, 0, &result.msg) ; #else sal_Char * attributes [2] = { const_cast<sal_Char *>(LDAP_NO_ATTRS), nullptr }; LdapErrCode retCode = ldap_search_s(mConnection, |