aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2012-01-26 17:33:33 +0000
committerJosé Fonseca <[email protected]>2012-01-26 17:33:33 +0000
commit6549e721addc8fdf6b44450bf40ca14052a7745d (patch)
treefc4cc4ab7bf7eeeaa6cfb6af29d614c8726fc364 /src
parent1d1033926dc8deb6e22b918889ec4be65637e4bf (diff)
mapi: Make initMagic unsigned.
To avoid signed/unsigned comparison warnings against INIT_MAGIC 0xff8adc98, which doesn't fit on signed integers.
Diffstat (limited to 'src')
-rw-r--r--src/mapi/mapi/u_thread.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mapi/mapi/u_thread.h b/src/mapi/mapi/u_thread.h
index 0b2beef8c63..ffe17b207a3 100644
--- a/src/mapi/mapi/u_thread.h
+++ b/src/mapi/mapi/u_thread.h
@@ -92,7 +92,7 @@ extern "C" {
struct u_tsd {
pthread_key_t key;
- int initMagic;
+ unsigned initMagic;
};
typedef pthread_mutex_t u_mutex;
@@ -126,7 +126,7 @@ u_tsd_init(struct u_tsd *tsd)
static INLINE void *
u_tsd_get(struct u_tsd *tsd)
{
- if (tsd->initMagic != (int) INIT_MAGIC) {
+ if (tsd->initMagic != INIT_MAGIC) {
u_tsd_init(tsd);
}
return pthread_getspecific(tsd->key);
@@ -136,7 +136,7 @@ u_tsd_get(struct u_tsd *tsd)
static INLINE void
u_tsd_set(struct u_tsd *tsd, void *ptr)
{
- if (tsd->initMagic != (int) INIT_MAGIC) {
+ if (tsd->initMagic != INIT_MAGIC) {
u_tsd_init(tsd);
}
if (pthread_setspecific(tsd->key, ptr) != 0) {
@@ -157,7 +157,7 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
struct u_tsd {
DWORD key;
- int initMagic;
+ unsigned initMagic;
};
typedef CRITICAL_SECTION u_mutex;
@@ -234,7 +234,7 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
#ifndef THREADS
struct u_tsd {
- int initMagic;
+ unsigned initMagic;
};
typedef unsigned u_mutex;