From nobody@FreeBSD.org  Tue Sep 21 13:01:33 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id ABE2416A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 21 Sep 2004 13:01:33 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A15F643D49
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 21 Sep 2004 13:01:33 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i8LD1Xa2013642
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 21 Sep 2004 13:01:33 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i8LD1WpP013640;
	Tue, 21 Sep 2004 13:01:32 GMT
	(envelope-from nobody)
Message-Id: <200409211301.i8LD1WpP013640@www.freebsd.org>
Date: Tue, 21 Sep 2004 13:01:32 GMT
From: Pavel Gubin <pg@ie.tusur.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: "make buildkernel" fails when "options RESTARTABLE_PANICS" is set
X-Send-Pr-Version: www-2.3

>Number:         71972
>Category:       misc
>Synopsis:       "make buildkernel" fails when "options RESTARTABLE_PANICS" is set
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jhb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 21 13:10:13 GMT 2004
>Closed-Date:    Thu Apr 14 23:43:53 GMT 2005
>Last-Modified:  Thu Apr 14 23:43:53 GMT 2005
>Originator:     Pavel Gubin
>Release:        RELENG_5
>Organization:
TUCS&R
>Environment:
FreeBSD lynx.ie.tusur.ru 5.3-BETA5 FreeBSD 5.3-BETA5 #9: Mon Sep 20 03:04:23 TSD 2004     pg@lynx.ie.tusur.ru:/var/data/5/obj/var/data/5/src/sys/Lynx  i386

>Description:
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:
/sys/kern/kern_intr.c
/sys/kern/subr_bus.c
/sys/kern/subr_witness.c

and possibly other places.

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

#ifdef RESTARTABLE_PANICS
void    panic(const char *, ...) __printflike(1, 2);
#else
void    panic(const char *, ...) __dead2 __printflike(1, 2);
#endif

>How-To-Repeat:
Add an "options RESTARTABLE_PANICS" line into kernel configfile, then "make buildkernel" breaks.

>Fix:
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.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jhb 
Responsible-Changed-By: ru 
Responsible-Changed-When: Thu Feb 17 10:06:08 GMT 2005 
Responsible-Changed-Why:  
Over to the author of RESTARTABLE_PANICS. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71972 

From: John Baldwin <jhb@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org, pg@ie.tusur.ru
Cc:  
Subject: Re: misc/71972: "make buildkernel" fails when "options RESTARTABLE_PANICS" is set
Date: Fri, 18 Feb 2005 10:18:25 -0500

 If you are using this option (it's not a "quick fix" for kernel panics), then 
 you should be able to figure out how to turn this warning off or turn -Werror 
 off from the Makefiles.  Having it not work out of the box is a feature 
 rather than a bug. :)
 
 -- 
 John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
 "Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
State-Changed-From-To: open->closed 
State-Changed-By: jhb 
State-Changed-When: Thu Apr 14 23:43:27 GMT 2005 
State-Changed-Why:  
Current behavior is the desired behavior. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71972 
>Unformatted:
