diff options
author | Bruno Haible <bruno@clisp.org> | 2011-07-08 13:25:16 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-07-08 13:25:16 +0200 |
commit | 65fb20d6b5eb7308276da1a421bfcd253faff703 (patch) | |
tree | 6404a42421cbc944a6b269c2da7af359fba4413f /lib/glthread | |
parent | 767a3af6d7da390cb15cc22c8797eab9a80f39db (diff) | |
download | gnulib-65fb20d6b5eb7308276da1a421bfcd253faff703.tar.gz |
thread: Avoid gcc warnings when using gl_thread_self().
* lib/glthread/thread.h (gl_thread_self): Return a pthread_t, not a
'void *'.
(gl_thread_self_pointer): Update.
Diffstat (limited to 'lib/glthread')
-rw-r--r-- | lib/glthread/thread.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/glthread/thread.h b/lib/glthread/thread.h index 82975bf167..2a819f9fab 100644 --- a/lib/glthread/thread.h +++ b/lib/glthread/thread.h @@ -161,9 +161,9 @@ typedef pthread_t gl_thread_t; extern const gl_thread_t gl_null_thread; # else # define gl_thread_self() \ - (pthread_in_use () ? (void *) pthread_self () : NULL) + (pthread_in_use () ? pthread_self () : (pthread_t) NULL) # define gl_thread_self_pointer() \ - gl_thread_self () + (pthread_in_use () ? (void *) pthread_self () : NULL) # endif # define gl_thread_exit(RETVAL) \ (pthread_in_use () ? pthread_exit (RETVAL) : 0) |