From owner-freebsd-current Mon Feb 25 22:35:41 2002 Delivered-To: freebsd-current@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 5742037B404 for ; Mon, 25 Feb 2002 22:35:37 -0800 (PST) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g1Q6Zai28573; Mon, 25 Feb 2002 23:35:36 -0700 (MST) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g1Q6ZYL21186; Mon, 25 Feb 2002 23:35:35 -0700 (MST) (envelope-from imp@village.org) Date: Mon, 25 Feb 2002 23:35:12 -0700 (MST) Message-Id: <20020225.233512.13036502.imp@village.org> To: mike_makonnen@yahoo.com Cc: peter@wemm.org, current@FreeBSD.ORG Subject: Re: HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd) From: "M. Warner Losh" In-Reply-To: <1014700670.677.9.camel@blackbox.pacbell.net> References: <20020226014624.8D6A03BAC@overcee.wemm.org> <20020225.215923.28857552.imp@village.org> <1014700670.677.9.camel@blackbox.pacbell.net> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <1014700670.677.9.camel@blackbox.pacbell.net> Mike Makonnen writes: : On Mon, 2002-02-25 at 20:59, M. Warner Losh wrote: : > I've fixed a few of the low hanging fruit, but I don't know how to get : > rid of warnings like: : > : > const char *foo = "blah"; : > char *baz = foo; : > : > when I know they are safe. : : Correct me if I'm wrong, but isn't the correct declaration: : : const char foo[] = "blah"; : char baz[] = "foo"; You miss the point. First, there's no "" around foo. Second, what I quoted was boiled down from a bunch of macros and such. Third, the real example would be volatile int conspeed; int *foo = &conspeed; Where foo is only accessed before all other accesses to conspeed. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message