bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: thread: fix some gcc warnings


From: Bruno Haible
Subject: Re: thread: fix some gcc warnings
Date: Fri, 8 Jul 2011 15:24:08 +0200
User-agent: KMail/1.9.9

Eric Blake wrote:
> > -     (pthread_in_use () ? (void *) pthread_self () : NULL)
> > +     (pthread_in_use () ? pthread_self () : (pthread_t) NULL)
> 
> This not portable.  POSIX allows pthread_t to be a non-pointer type, so
> you can't necessarily cast NULL to pthread_t.

Yes, and the only platform that defines pthread_t to a non-scalar type
is pthreads-win32, and it is handled 5 lines above that code.

Bruno
-- 
In memoriam Jean Moulin <http://en.wikipedia.org/wiki/Jean_Moulin>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]