Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2002 00:52:57 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        "M. Warner Losh" <imp@village.org>
Cc:        peter@wemm.org, current@FreeBSD.ORG
Subject:   Re: HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd)
Message-ID:  <3C7B4CE9.1DD58D46@mindspring.com>
References:  <20020226014624.8D6A03BAC@overcee.wemm.org> <20020225.215923.28857552.imp@village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
"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.

Un-const foo.  The compiler assumes strings are const unless
you go out of your way to do -fwriteable-strings.  It will
fault on a non-writeable page if you try to muck with it.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C7B4CE9.1DD58D46>