From: Julia Lawall Date: Sun, 10 May 2015 20:03:21 +0000 Subject: Re: type mismatch Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kernel-janitors@vger.kernel.org On Sun, 10 May 2015, Dan Carpenter wrote: > I don't really have a strong opinion either way... It's unlikely that > we will introduce a bug here and if we did, I think it would be caught > immediately in testing. > > It's pretty common to treat the first member of a struct as special. > What annoys me is when people do > > struct foo { > int one, two, three; > whatever; > }; > > memcpy(&foo.one, src, sizoef(struct foo)); > > Argh!? These triger buffer overflows warnings in Smatch and I don't > see the point since &foo.one is less readable than &foo! Oh well, I > think these were common enough, I had to treat it as idiomatic and add a > special case for them. OK, thanks. julia