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

Reini Urban rurban at x-ray.at
Tue Feb 1 00:11:33 EST 2011


2011/1/31 Rusty Russell <rusty at rustcorp.com.au>:
> 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...

Ah sorry.
gcc-4.3.4 cygwin

Probably the noreturn attribute is ignored here
-- 
Reini Urban


More information about the ccan mailing list