make buildworld error with current

Peter Jeremy peterjeremy at optushome.com.au
Wed Apr 5 19:03:29 UTC 2006


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


More information about the freebsd-current mailing list