New and bogus(!) warning produced by sparse.
From: Anton Altaparmakov (aia21_at_cam.ac.uk)
Date: 09/30/05
- Previous message: Russell King: "Re: [patch] switch mtd to new driver model & cleanups"
- Next in thread: Linus Torvalds: "Re: New and bogus(!) warning produced by sparse."
- Reply: Linus Torvalds: "Re: New and bogus(!) warning produced by sparse."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Sep 2005 15:03:08 +0100 (BST) To: Linus Torvalds <torvalds@osdl.org>
Hi Linus,
I just did a git pull on sparse and it produced a new and I believe
bogus warning when trying to assign a value to a bit field member. The
warning is:
warning: generating address of non-lvalue (1)
Below is an example program that triggers the warning when you run:
sparse sparse-test.c
Best regards,
Anton
-- Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/ --- sparse-test.c --- int main(void) { struct { unsigned bit1:1; unsigned bit2:1; } bits = { 0, 0 }; bits.bit1 = 1; /* sparse warns here! */ bits.bit2 = 0; /* sparse warns here! */ return 0; } - 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/
- Previous message: Russell King: "Re: [patch] switch mtd to new driver model & cleanups"
- Next in thread: Linus Torvalds: "Re: New and bogus(!) warning produced by sparse."
- Reply: Linus Torvalds: "Re: New and bogus(!) warning produced by sparse."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|