[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <adahblls0kx.fsf@roland-alpha.cisco.com>
Date:	Wed, 02 Jun 2010 12:20:46 -0700
From:	Roland Dreier <rdreier@...co.com>
To:	Dan Carpenter <error27@...il.com>
Cc:	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [announce] smatch 1.54
Hi Dan,
I'm trying out smatch on some kernel code now.  Neat stuff, but I'm
seeing some puzzling false positives relating to signedness.  Basically,
if I have code like:
	__be16 foo;
	__u16 bar;
	foo = cpu_to_be16(128);
	bar = cpu_to_be16(128);
then the first line warns about 32768 not fitting into foo, but while
the second line doesn't warn, even though __be16 is just a __bitwise__
__u16.  I don't understand the sparse / smatch internals so I'm not sure
why applying __bitwise__ apparently kills the unsigned modifier.  Maybe
it's an easy fix for you?  Otherwise I'll poke at it a little later.
Thanks,
  Roland
-- 
Roland Dreier <rolandd@...co.com> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
