tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Fixing noreturn function



In the netbsd-5 source tree, I get the following warning/error:

/nbsd/coldfire-5/tools/bin/m68k--netbsdelf-gcc -march=isac -mcpu=54455 
-fno-optimize-sibling-calls -D__NetBSD__ -msoft-float -ffreestanding 
-fno-zero-initialized-in-bss -pipe -O2 -std=gnu99 -fno-strict-aliasing -Wall 
-Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes 
-Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings 
-Wno-unreachable-code -Wno-sign-compare -Wno-pointer-sign -Wno-attributes 
-Dcoldfire -I. -I/nbsd/nbsd-5/sys/../common/include -I/nbsd/nbsd-5/sys/arch 
-I/nbsd/nbsd-5/sys -nostdinc -DMAXUSERS=4 -D_KERNEL -D_KERNEL_OPT 
-I/nbsd/nbsd-5/sys/lib/libkern/../../../common/lib/libc/quad 
-I/nbsd/nbsd-5/sys/lib/libkern/../../../common/lib/libc/string 
-I/nbsd/nbsd-5/sys/lib/libkern/../../../common/lib/libc/arch/m68k/string -c 
/nbsd/nbsd-5/sys/kern/kern_lwp.c
/nbsd/nbsd-5/sys/kern/kern_lwp.c: In function 'lwp_exit':
/nbsd/nbsd-5/sys/kern/kern_lwp.c:856: warning: 'noreturn' function does return

Any suggestions on how to fix this?  If !current, the function will
just return at the end, rather than going through lwp_exit_switchaway().
Also I would have guessed that lwp_exit_switchaway should be
marked __dead() as well.

-Kurt


Home | Main Index | Thread Index | Old Index