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(in

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

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: > < 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 > knowledge to

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

2002-02-26 Thread Garrett Wollman
< 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 knowledge to be able to determine whether this usage is safe or not. -GAWo

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

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

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 -fwr

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). >

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; :

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

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 hangin