[ccan] [PATCH] antithread: fix gcc 4.3 errors: control reaches end of non-void function

Rusty Russell rusty at rustcorp.com.au
Mon Jan 31 21:28:09 EST 2011


On Mon, 31 Jan 2011 07:16:23 pm Reini Urban wrote:
> ---
>  ccan/antithread/antithread.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/ccan/antithread/antithread.c b/ccan/antithread/antithread.c
> index 61b288a..430f617 100644
> --- a/ccan/antithread/antithread.c
> +++ b/ccan/antithread/antithread.c
> @@ -391,6 +391,7 @@ void *at_read(struct athread *at)
>  	default:
>  		/* Should never happen. */
>  		err(1, "Short read from athread %p (pid %u)", at, at->pid);
> +		return NULL;

Hi, what platform is this?

Here it's marked as a noreturn function, so gcc knows it's not going to
return...

Thanks,
Rusty.


More information about the ccan mailing list