diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-07-02 22:31:03 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-07-02 22:31:03 +0200 |
commit | e303d4b93cbe7ba9b96c9d274b83e88632f73073 (patch) | |
tree | b99c4d7d0e0282ee1c5be47c79d0198491208b1e /sal/osl/unx/security.cxx | |
parent | 592ab6435b22f7d1a0d9d940ccc32059fed05b87 (diff) |
loplugin:casttovoid: sal
Change-Id: I70cf54799f08e3bc586d42d6c634eb02a049ea0f
Diffstat (limited to 'sal/osl/unx/security.cxx')
-rw-r--r-- | sal/osl/unx/security.cxx | 78 |
1 files changed, 9 insertions, 69 deletions
diff --git a/sal/osl/unx/security.cxx b/sal/osl/unx/security.cxx index 792ea8166c9c..d1d39c389b41 100644 --- a/sal/osl/unx/security.cxx +++ b/sal/osl/unx/security.cxx @@ -47,9 +47,6 @@ #define getpwuid_r(uid, pwd, buf, buflen, result) (*(result) = getpwuid(uid), (*(result) ? (memcpy (buf, *(result), sizeof (struct passwd)), 0) : errno)) #endif -static oslSecurityError SAL_CALL -osl_psz_loginUser(const sal_Char* pszUserName, const sal_Char* pszPasswd, - oslSecurity* pSecurity); static bool SAL_CALL osl_psz_getUserName(oslSecurity Security, sal_Char* pszName, sal_uInt32 nMax); static bool SAL_CALL osl_psz_getHomeDir(oslSecurity Security, sal_Char* pszDirectory, sal_uInt32 nMax); static bool SAL_CALL osl_psz_getConfigDir(oslSecurity Security, sal_Char* pszDirectory, sal_uInt32 nMax); @@ -139,74 +136,21 @@ oslSecurity SAL_CALL osl_getCurrentSecurity() } oslSecurityError SAL_CALL osl_loginUser( - rtl_uString *ustrUserName, - rtl_uString *ustrPassword, - oslSecurity *pSecurity + SAL_UNUSED_PARAMETER rtl_uString *, + SAL_UNUSED_PARAMETER rtl_uString *, + SAL_UNUSED_PARAMETER oslSecurity * ) { - oslSecurityError Error; - rtl_String* strUserName=nullptr; - rtl_String* strPassword=nullptr; - sal_Char* pszUserName=nullptr; - sal_Char* pszPassword=nullptr; - - if ( ustrUserName != nullptr ) - { - rtl_uString2String( &strUserName, - rtl_uString_getStr(ustrUserName), - rtl_uString_getLength(ustrUserName), - RTL_TEXTENCODING_UTF8, - OUSTRING_TO_OSTRING_CVTFLAGS ); - pszUserName = rtl_string_getStr(strUserName); - } - - if ( ustrPassword != nullptr ) - { - rtl_uString2String( &strPassword, - rtl_uString_getStr(ustrPassword), - rtl_uString_getLength(ustrPassword), - RTL_TEXTENCODING_UTF8, - OUSTRING_TO_OSTRING_CVTFLAGS ); - pszPassword = rtl_string_getStr(strPassword); - } - - Error=osl_psz_loginUser(pszUserName,pszPassword,pSecurity); - - if ( strUserName != nullptr ) - { - rtl_string_release(strUserName); - } - - if ( strPassword) - { - rtl_string_release(strPassword); - } - - return Error; -} - -static oslSecurityError SAL_CALL -osl_psz_loginUser(const sal_Char* pszUserName, const sal_Char* pszPasswd, - oslSecurity* pSecurity) -{ - (void)pszUserName; - (void)pszPasswd; - (void)pSecurity; - return osl_Security_E_None; } oslSecurityError SAL_CALL osl_loginUserOnFileServer( - rtl_uString *strUserName, - rtl_uString *strPasswd, - rtl_uString *strFileServer, - oslSecurity *pSecurity + SAL_UNUSED_PARAMETER rtl_uString *, + SAL_UNUSED_PARAMETER rtl_uString *, + SAL_UNUSED_PARAMETER rtl_uString *, + SAL_UNUSED_PARAMETER oslSecurity * ) { - (void) strUserName; /* unused */ - (void) strPasswd; /* unused */ - (void) strFileServer; /* unused */ - (void) pSecurity; /* unused */ return osl_Security_E_UserUnknown; } @@ -514,15 +458,11 @@ void SAL_CALL osl_freeSecurityHandle(oslSecurity Security) deleteSecurityImpl(static_cast<oslSecurityImpl *>(Security)); } -sal_Bool SAL_CALL osl_loadUserProfile(oslSecurity Security) +sal_Bool SAL_CALL osl_loadUserProfile(SAL_UNUSED_PARAMETER oslSecurity) { - (void) Security; /* unused */ return false; } -void SAL_CALL osl_unloadUserProfile(oslSecurity Security) -{ - (void) Security; /* unused */ -} +void SAL_CALL osl_unloadUserProfile(SAL_UNUSED_PARAMETER oslSecurity) {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |