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
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
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
< 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
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
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
"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
"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).
>
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;
:
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
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
11 matches
Mail list logo