summaryrefslogtreecommitdiff
path: root/sal/osl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-02 11:27:42 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-02 11:27:42 +0200
commite60cea3c8d14c1146ed2855024872fecb0959f66 (patch)
tree213022ad44fe31ea4f55fcc874d7135d024207f1 /sal/osl
parent0fc8d8f6eba3ff49e7252fce661aa61dccfb3740 (diff)
loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: Iad01e628b692a6dcf882696908de0ef1f24c04c4
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/unx/module.cxx4
-rw-r--r--sal/osl/unx/mutex.cxx2
-rw-r--r--sal/osl/unx/process.cxx2
-rw-r--r--sal/osl/unx/socket.cxx4
4 files changed, 6 insertions, 6 deletions
diff --git a/sal/osl/unx/module.cxx b/sal/osl/unx/module.cxx
index ca3318fad449..65e00570f4a1 100644
--- a/sal/osl/unx/module.cxx
+++ b/sal/osl/unx/module.cxx
@@ -161,7 +161,7 @@ oslModule SAL_CALL osl_loadModuleAscii(const sal_Char *pModuleName, sal_Int32 nR
"dlopen(" << pModuleName << ", " << rtld_mode << "): "
<< dlerror());
#endif
- return ((oslModule)(pLib));
+ return pLib;
}
return NULL;
}
@@ -206,7 +206,7 @@ sal_Bool SAL_CALL
osl_getModuleHandle(rtl_uString *, oslModule *pResult)
{
#if !defined(DISABLE_DYNLOADING) || defined(IOS)
- *pResult = (oslModule) RTLD_DEFAULT;
+ *pResult = static_cast<oslModule>(RTLD_DEFAULT);
#else
*pResult = NULL;
#endif
diff --git a/sal/osl/unx/mutex.cxx b/sal/osl/unx/mutex.cxx
index 515a2edb9102..bc51fbac498f 100644
--- a/sal/osl/unx/mutex.cxx
+++ b/sal/osl/unx/mutex.cxx
@@ -163,7 +163,7 @@ static void globalMutexInitImpl() {
oslMutex * SAL_CALL osl_getGlobalMutex()
{
/* necessary to get a "oslMutex *" */
- static oslMutex globalMutex = (oslMutex) &globalMutexImpl;
+ static oslMutex globalMutex = &globalMutexImpl;
static pthread_once_t once = PTHREAD_ONCE_INIT;
if (pthread_once(&once, &globalMutexInitImpl) != 0) {
diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx
index af4e59e73429..1198e73eebed 100644
--- a/sal/osl/unx/process.cxx
+++ b/sal/osl/unx/process.cxx
@@ -240,7 +240,7 @@ static void ChildStatusProc(void *pData)
// No need to check the return value of execv. If we return from
// it, an error has occurred.
- execv(data.m_pszArgs[0], (sal_Char **)data.m_pszArgs);
+ execv(data.m_pszArgs[0], const_cast<char **>(data.m_pszArgs));
}
OSL_TRACE("Failed to exec, errno=%d (%s)", errno, strerror(errno));
diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx
index 6aba809bce4f..2bc7217cd13a 100644
--- a/sal/osl/unx/socket.cxx
+++ b/sal/osl/unx/socket.cxx
@@ -460,7 +460,7 @@ oslSocket __osl_createSocketImpl(int Socket)
void __osl_destroySocketImpl(oslSocket Socket)
{
if ( Socket != NULL)
- free((struct oslSocketImpl *) Socket);
+ free(Socket);
#if OSL_DEBUG_LEVEL > 1
g_nSocketImpl --;
#endif
@@ -2353,7 +2353,7 @@ oslSocketSet SAL_CALL osl_createSocketSet()
FD_ZERO(&pSet->m_Set);
}
- return (oslSocketSet)pSet;
+ return pSet;
}
void SAL_CALL osl_destroySocketSet(oslSocketSet Set)