[Libreoffice-commits] core.git: sal/osl
Stephan Bergmann
sbergman at redhat.com
Thu Apr 20 05:58:39 UTC 2017
sal/osl/unx/system.hxx | 2 +-
sal/osl/unx/thread.cxx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 5733eeb43dc34b1bffc9eb14af3de976a4202bd0
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Apr 20 07:58:10 2017 +0200
Avoid loplugin:redundantcast on macOS
Change-Id: I5e9f2552f83e72d1f6eb1a12df19c0fdfa012e31
diff --git a/sal/osl/unx/system.hxx b/sal/osl/unx/system.hxx
index 9fd4a640f830..78d49c403ddf 100644
--- a/sal/osl/unx/system.hxx
+++ b/sal/osl/unx/system.hxx
@@ -274,7 +274,7 @@ int macxp_resolveAlias(char *path, int buflen);
#if defined MACOSX
#define PTHREAD_VALUE(t) reinterpret_cast<unsigned long>(t)
#else
-#define PTHREAD_VALUE(t) (t)
+#define PTHREAD_VALUE(t) ((unsigned long) (t))
#endif
#ifndef PTHREAD_NONE
diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx
index 80d8cbb51b45..34bf38cde607 100644
--- a/sal/osl/unx/thread.cxx
+++ b/sal/osl/unx/thread.cxx
@@ -552,7 +552,7 @@ void SAL_CALL osl_setThreadName(char const * name) {
/* osl_getThreadIdentifier @@@ see TODO @@@ */
/*****************************************************************************/
-#define HASHID(x) ((unsigned long)PTHREAD_VALUE(x) % HashSize)
+#define HASHID(x) (PTHREAD_VALUE(x) % HashSize)
struct HashEntry
{
More information about the Libreoffice-commits
mailing list