misc/71972: "make buildkernel" fails when "options RESTARTABLE_PANICS" is set

Pavel Gubin pg at ie.tusur.ru
Tue Sep 21 06:10:24 PDT 2004

>Number:         71972
>Category:       misc
>Synopsis:       "make buildkernel" fails when "options RESTARTABLE_PANICS" is set
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 21 13:10:13 GMT 2004
>Originator:     Pavel Gubin
>Release:        RELENG_5
FreeBSD lynx.ie.tusur.ru 5.3-BETA5 FreeBSD 5.3-BETA5 #9: Mon Sep 20 03:04:23 TSD 2004     pg at lynx.ie.tusur.ru:/var/data/5/obj/var/data/5/src/sys/Lynx  i386

When "options RESTARTABLE_PANICS" is enabled, gcc finds a warnings in
many source modules, like this:
/src/sys/fs/devfs/devfs_devs.c: In function `devfs_itor':
/src/sys/fs/devfs/devfs_devs.c:82: warning: control reaches end of non-void function
and then build fails because of -Werror.

The warnings like this one also found in:

and possibly other places.

The warnings are appeared because RESTARTABLE_PANICS changes panic() prototype definition in sys/systm.h:324:

void    panic(const char *, ...) __printflike(1, 2);
void    panic(const char *, ...) __dead2 __printflike(1, 2);

Add an "options RESTARTABLE_PANICS" line into kernel configfile, then "make buildkernel" breaks.

I've tried to quickly fix a problem by inserting `for(;;);' aftel call to panic() in the files which are failed to compile, but after a 4 or 5 fixes decided that there must be 'a more right way' to fix this.

More information about the freebsd-bugs mailing list