From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: type mismatch
Date: Sun, 10 May 2015 19:57:22 +0000 [thread overview]
Message-ID: <20150510195722.GG14154@mwanda> (raw)
In-Reply-To: <alpine.DEB.2.10.1505101517100.2645@hadrien>
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.
regards,
dan carpenter
next prev parent reply other threads:[~2015-05-10 19:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-10 13:20 type mismatch Julia Lawall
2015-05-10 19:57 ` Dan Carpenter [this message]
2015-05-10 20:03 ` Julia Lawall
2015-05-11 7:18 ` Nicholas Mc Guire
2015-05-11 7:32 ` Julia Lawall
2015-05-11 8:14 ` Dan Carpenter
2015-05-11 8:29 ` Nicholas Mc Guire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150510195722.GG14154@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox