Re: [PATCH 1/4] NTFS: Fix sparse warnings that have crept in overtime.
From: Linus Torvalds
Date: Mon Sep 26 2005 - 15:43:47 EST
On Mon, 26 Sep 2005, Anton Altaparmakov wrote:
> > I'm actually a bit surprised that the cast even shut sparse up. It
> > probably shouldn't have, and it should have complained about casting an
> > unknown type even _with_ your added cast (ie I think it should have cut
> > your four lines of warning down to one).
> > Did it?
> No, the warnings completely disappeared with the cast.
Ok, it turns out that a bad enum type ends up being seen as just its
integer type, and anything that doesn't care about anything else than its
size (namely, a cast) won't even complain.
That's very arguably a bug. Oh, well. Not a big one.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/