Date: Wed, 27 Jul 2005 15:31:35 +0200 From: Stefan Farfeleder <stefan@fafoe.narf.at> To: jason henson <jason@ec.rr.com> Cc: hackers@freebsd.org Subject: Re: using -ftracer stops buildworld at shutdown.c Message-ID: <20050727133133.GA560@wombat.fafoe.narf.at> In-Reply-To: <42E6BD5F.7020909@ec.rr.com> References: <42E6BD5F.7020909@ec.rr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 26, 2005 at 06:46:55PM -0400, jason henson wrote: > To avoid this warning, the variables and/or arguments should be > prevented from being optimized by declaring them as volatile. > > So I sprinkled some volatiles around, but mostly got more errors that > said "gcc volatile discards qualifiers from pointer target type" in the > fprintf functions. Replacing line 276 with 'FILE *volatile pf;' fixes the warning. But the usage of {long,set}jmp() is wrong anyway since timeout() can jump back into timewarn() while that isn't executed at all. Stefan --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="shutdown.c.diff" Index: shutdown.c =================================================================== RCS file: /home/ncvs/src/sbin/shutdown/shutdown.c,v retrieving revision 1.28 diff -I.svn -u -r1.28 shutdown.c --- shutdown.c 25 Jan 2005 08:40:51 -0000 1.28 +++ shutdown.c 27 Jul 2005 13:24:29 -0000 @@ -273,7 +273,7 @@ { static int first; static char hostname[MAXHOSTNAMELEN + 1]; - FILE *pf; + FILE *volatile pf; char wcmd[MAXPATHLEN + 4]; if (!first++) --6TrnltStXW4iwmi0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050727133133.GA560>