[Xcb] warning in hypnomoire.c

Jamey Sharp jamey at minilop.net
Mon Dec 19 13:10:37 PST 2005


On Sun, Dec 18, 2005 at 07:28:57AM +0100, Vincent Torri wrote:
> hey

Hi Vincent!

> the function run in hypnomoire must return a void * but returns nothing. I
> know that the prototype is for pthread_create. Maybe we should return
> NULL, which should be the value for a success, iirc.
> 
> any objection that i return NULL ?

A return statement there would be unreachable, since the function ends
with an infinite loop that contains no break statements. I'm not
especially fond of adding unreachable code.

I am fond of compiling with GCC's -Wall flag. If that loop ever gains a
termination condition, -Wall will catch that a return statement is
needed there. I'd accept a patch to enable -Wall when GCC is in use and
leave CFLAGS alone otherwise.

--Jamey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20051219/a24ba792/attachment.pgp


More information about the Xcb mailing list