Re: HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd)

2002-02-26 Thread Terry Lambert
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

Re: HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd)

2002-02-26 Thread Georg-W Koltermann
Hi Warner, a simple cast char *baz = (char*)foo; works for me. -- Regards, Georg. At Mon, 25 Feb 2002 21:59:23 -0700 (MST), M. Warner Losh [EMAIL PROTECTED] wrote: In message: [EMAIL PROTECTED] Peter Wemm [EMAIL PROTECTED] writes: : There are a couple of offending files in

Re: HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd)

2002-02-26 Thread Peter Dufault
On Mon, Feb 25, 2002 at 11:35:12PM -0700, M. Warner Losh wrote: In message: [EMAIL PROTECTED] Mike Makonnen [EMAIL PROTECTED] 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

Re: HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd)

2002-02-26 Thread Garrett Wollman
On Mon, 25 Feb 2002 23:35:12 -0700 (MST), M. Warner Losh [EMAIL PROTECTED] said: volatile int conspeed; int *foo = conspeed; The answer to this is Not all warnings are indicative of errors. It is unreasonable to expect all warnings to be removed, since the compiler has insufficient

Re: HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd)

2002-02-26 Thread Bruce Evans
On Tue, 26 Feb 2002, Garrett Wollman wrote: On Mon, 25 Feb 2002 23:35:12 -0700 (MST), M. Warner Losh [EMAIL PROTECTED] said: volatile int conspeed; int *foo = conspeed; The answer to this is Not all warnings are indicative of errors. It is unreasonable to expect all warnings to

Re: HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd)

2002-02-26 Thread Peter Wemm
Peter Dufault wrote: On Mon, Feb 25, 2002 at 11:35:12PM -0700, M. Warner Losh wrote: In message: [EMAIL PROTECTED] Mike Makonnen [EMAIL PROTECTED] 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

Re: HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd)

2002-02-26 Thread Bruce Evans
On Tue, 26 Feb 2002, Peter Wemm wrote: Peter Dufault wrote: When it is too twisty to fix at the moment I use macros such as: #define BOGUSLY_CAST_AWAY_VOLATILITY(T,P) ((T)(unsigned int)(P)) ... volatile int conspeed; int *foo = BOGUSLY_CAST_AWAY_VOLATILITY(int *, conspeed);

HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd)

2002-02-25 Thread Peter Wemm
There are a couple of offending files in the kernel still, and some drivers. The things people are most likely to run into are: usb, inet6, and some drivers (twe, asr etc). Yes, you will almost certainly need 'make -DNO_WERROR' for the short term. But do take a look, there is some low hanging

Re: HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd)

2002-02-25 Thread M. Warner Losh
In message: [EMAIL PROTECTED] Peter Wemm [EMAIL PROTECTED] writes: : There are a couple of offending files in the kernel still, and some : drivers. The things people are most likely to run into are: usb, inet6, : and some drivers (twe, asr etc). I've fixed a few of the low hanging

Re: HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd)

2002-02-25 Thread Mike Makonnen
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

Re: HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd)

2002-02-25 Thread M. Warner Losh
In message: [EMAIL PROTECTED] Mike Makonnen [EMAIL PROTECTED] 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

Re: HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd)

2002-02-25 Thread Peter Wemm
M. Warner Losh wrote: In message: [EMAIL PROTECTED] Peter Wemm [EMAIL PROTECTED] writes: : There are a couple of offending files in the kernel still, and some : drivers. The things people are most likely to run into are: usb, inet6, : and some drivers (twe, asr etc). I've