Re: fix some gcc warnings

2016-10-22 Thread Bruno Haible
Pádraig Brady wrote: > > 2016-10-16 Bruno Haible > > > > Fix some "gcc -Wall" warnings. > > * tests/test-ffsl.c (main): Use variable x, not i. > > * tests/test-posix_spawn3.c (parent_main): Consider the return value of > > freopen. > > *

Re: fix some gcc warnings

2016-10-16 Thread Pádraig Brady
On 16/10/16 16:01, Bruno Haible wrote: > Hi, > > When I compile a gnulib testdir with "gcc -Wall", I see the following warnings > (among others): > > test-ffsl.c: In function 'main': > test-ffsl.c:44:12: warning: unused variable 'x' [-Wunused-variable] > > test-posix_spawn3.c: In function

fix some gcc warnings

2016-10-16 Thread Bruno Haible
Hi, When I compile a gnulib testdir with "gcc -Wall", I see the following warnings (among others): test-ffsl.c: In function 'main': test-ffsl.c:44:12: warning: unused variable 'x' [-Wunused-variable] test-posix_spawn3.c: In function 'parent_main': test-posix_spawn3.c:78:11: warning: ignoring

thread: fix some gcc warnings

2011-07-08 Thread Bruno Haible
The statement gl_thread_t t = gl_thread_self (); gives a gcc warning about assignment from a pointer to an integer. This fixes it: 2011-07-08 Bruno Haible br...@clisp.org thread: Avoid gcc warnings when using gl_thread_self(). * lib/glthread/thread.h (gl_thread_self): Return

Re: thread: fix some gcc warnings

2011-07-08 Thread Eric Blake
On 07/08/2011 05:27 AM, Bruno Haible wrote: The statement gl_thread_t t = gl_thread_self (); gives a gcc warning about assignment from a pointer to an integer. This fixes it: 2011-07-08 Bruno Haible br...@clisp.org thread: Avoid gcc warnings when using gl_thread_self().

Re: thread: fix some gcc warnings

2011-07-08 Thread Bruno Haible
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