Avoid reinterpret_cast to same type
...as GCC 4.6 reports "error: invalid cast from type 'pthread_t {aka long unsigned int}' to type 'long unsigned int'" despite [expr.reinterpret.cast]/2: "An expression of integral, enumeration, pointer, or pointer-to-member type can be explicitly converted to its own type; such a cast yields the value of its operand." Change-Id: I26f1a3e6df2f0e55c665ad4f49185e0ebf432e95
This commit is contained in:
parent
921cea89da
commit
ed8110e101
@ -309,9 +309,12 @@ int macxp_resolveAlias(char *path, int buflen);
|
||||
# define INIT_GROUPS(name, gid) ((setgid((gid)) == 0) && (initgroups((name), (gid)) == 0))
|
||||
#endif
|
||||
|
||||
#ifndef PTHREAD_VALUE
|
||||
# define PTHREAD_VALUE(t) (t)
|
||||
#if defined MACOSX
|
||||
#define PTHREAD_VALUE(t) reinterpret_cast<unsigned long>(t)
|
||||
#else
|
||||
#define PTHREAD_VALUE(t) (t)
|
||||
#endif
|
||||
|
||||
#ifndef PTHREAD_NONE
|
||||
# define PTHREAD_NONE _pthread_none_
|
||||
# ifndef PTHREAD_NONE_INIT
|
||||
|
@ -551,7 +551,7 @@ void SAL_CALL osl_setThreadName(char const * name) {
|
||||
/* osl_getThreadIdentifier @@@ see TODO @@@ */
|
||||
/*****************************************************************************/
|
||||
|
||||
#define HASHID(x) (reinterpret_cast<unsigned long>(PTHREAD_VALUE(x)) % HashSize)
|
||||
#define HASHID(x) ((unsigned long)PTHREAD_VALUE(x) % HashSize)
|
||||
|
||||
typedef struct _HashEntry
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user