Re: make buildworld error with current

From: Peter Jeremy <peterjeremy_at_optushome.com.au>
Date: Thu, 6 Apr 2006 05:03:25 +1000
On Wed, 2006-Apr-05 08:58:13 -0700, Jason Evans wrote:
>Michael Zach wrote:
>>/usr/src/lib/libc/stdlib/malloc.c: In function `arena_run_reg_alloc':
>>/usr/src/lib/libc/stdlib/malloc.c:1540: warning: control reaches end of 
>>a non-void function
...
>>If needed a script-snippet is available. Actually I'm running out of 
>>ideas what could raise the error since line 1540 in malloc.c is an 
>>"assert(0);" ...
>
>Do you have non-standard compiler flags set?  I don't see this warning.

I get the same error with malloc.c v1.123.

The compiler warning makes sense.  arena_run_reg_alloc() should return
a void* but ends with assert(0);.  This is not safe because assert()
can be compiled out by setting 'NDEBUG'.  You should probably use
abort() rather than assert(0).

-- 
Peter Jeremy
Received on Wed Apr 05 2006 - 17:03:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:54 UTC