From: Bruno Haible Date: Fri, 8 Jul 2011 11:25:16 +0000 (+0200) Subject: thread: Avoid gcc warnings when using gl_thread_self(). X-Git-Tag: v0.1~2154 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=65fb20d6b5eb7308276da1a421bfcd253faff703;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 5706875ae..f64fd6245 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-07-08 Bruno Haible + + 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. + 2011-07-07 Bruno Haible signal-c++-tests: Check declaration of pthread_sigmask. diff --git a/lib/glthread/thread.h b/lib/glthread/thread.h index 82975bf16..2a819f9fa 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)