From: Pavel Roskin <proski@gnu.org>
To: Christopher Li <sparse@chrisli.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>, linux-sparse@vger.kernel.org
Subject: Re: [PATCH] Re: error, types differ in signedness
Date: Mon, 05 Feb 2007 17:27:11 -0500 [thread overview]
Message-ID: <1170714431.1453.10.camel@dv> (raw)
In-Reply-To: <20070205200617.GA14964@chrisli.org>
Chris,
On Mon, 2007-02-05 at 12:06 -0800, Christopher Li wrote:
> On Mon, Feb 05, 2007 at 10:54:20AM -0800, Randy Dunlap wrote:
> > The skbuff.[hc] difference is in *getfrag vs. getfrag.
> > The mpage.[hc] difference is in *get_block vs. getblock.
I remember having this problem in MadWifi, and it was hard to understand
what was going on. I had to put the declarations back-to-back and look
at them very carefully.
> > Questions:
> > 1. Is the warning valid?
>
> I don't think so.
I think any difference between declarations other than missing argument
names is an example of sloppy coding and should be avoided.
> > 2. Isn't the '*' unnecessary?
>
> It is valid in C without '*'. Sparse already know the function
> is going to degenerated into function pointers. It wrongly inherent
> the signedness. You get a signed pointer.
>
> Can you please try this patch?
I would prefer that sparse emits a specific warning about function vs
function pointer mismatch. Even if it doesn't matter, it makes the code
easier to read and safer to modify.
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2007-02-05 22:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-05 18:54 error, types differ in signedness Randy Dunlap
2007-02-05 20:06 ` [PATCH] " Christopher Li
2007-02-05 21:04 ` Randy Dunlap
2007-02-05 22:27 ` Pavel Roskin [this message]
2007-02-06 0:16 ` Christopher Li
2007-02-06 1:12 ` Pavel Roskin
2007-02-06 18:36 ` Christopher Li
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=1170714431.1453.10.camel@dv \
--to=proski@gnu.org \
--cc=linux-sparse@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=sparse@chrisli.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;
as well as URLs for NNTP newsgroup(s).