On Wed, Apr 04, 2012 at 12:48:45PM +0100, Iain Patterson wrote: > Quoth Carlos R. Mafra, > > >main.c: In function ‘RelaunchWindow’: > >main.c:461:1: warning: control reaches end of non-void function > >[-Wreturn-type] > > Actually we can't reach the end of the function because the three > possible cases are Exit(-1), return False and return True. Of course if > Exit() were ever changed the above statement might become incorrect. > Some compiler food silences the warning.
Another option for gcc is to apply __attribute__((noreturn)) to the Exit function definition in src/funcs.h, so the compiler knows the function never returns. void Exit(int status) __attribute__((noreturn)); ./WINGs/WINGs/WUtil.h (lines 31-33) already has the magic to make __attribute__ not break non-GCC compilers, BTW, although I don't know whether that is included whenever src/funcs.h is. -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.