lkml.org 
[lkml]   [2004]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 8/10] Re: [2.6-BK-URL] NTFS: 2.1.19 sparse annotation, cleanups and a bugfix
On Fri, Sep 24, 2004 at 07:46:20PM -0700, Linus Torvalds wrote:
> So I would stronly suggest (and I may make sparse warn) against using
> non-integertyped enum values with any enum that actually has any backing
> store (ie if you ever use a variable of type "enum myenum", that would
> result in a warning - you can really just use the values "one" and "two"
> directly).

Linus, backing store is irrelevant here (and BTW, variables are no better
or worse than arguments / structure fields / return values / argument of
sizeof / etc.)

a) integer type equivalent to particular enum is up to compiler; anything
that depends on it is at the very least non-portable.

b) __bitwise doesn't break anything; __le32 enum members are just as OK as
int ones.

c) its enum members where we are not doing what gcc does; enum itself is
trivial to deal with. So that's where the warnings should be.

Anyway, I'll send you sparse patches tomorrow when I rediff that stuff to
your current tree...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.221 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site