From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH] pkt-line: Fix sparse errors and warnings
Date: Tue, 26 Feb 2013 19:02:59 +0000 [thread overview]
Message-ID: <512D06E3.5020109@ramsay1.demon.co.uk> (raw)
In-Reply-To: <20130223223700.GB2504@sigill.intra.peff.net>
Jeff King wrote:
> On Sat, Feb 23, 2013 at 05:31:34PM -0500, Jeff King wrote:
>
>> On Sat, Feb 23, 2013 at 06:44:04PM +0000, Ramsay Jones wrote:
>>
>>> Sparse issues the following error and warnings:
>>>
>>> pkt-line.c:209:51: warning: Using plain integer as NULL pointer
>>> sideband.c:41:52: warning: Using plain integer as NULL pointer
>>> daemon.c:615:39: warning: Using plain integer as NULL pointer
>>> remote-curl.c:220:75: error: incompatible types for operation (>)
>>> remote-curl.c:220:75: left side has type char *
>>> remote-curl.c:220:75: right side has type int
>>> remote-curl.c:291:53: warning: Using plain integer as NULL pointer
>>> remote-curl.c:408:43: warning: Using plain integer as NULL pointer
>>> remote-curl.c:562:47: warning: Using plain integer as NULL pointer
>>>
>>> All of these complaints "blame" to commit 17243606 ("pkt-line: share
>>> buffer/descriptor reading implementation", 20-02-2013).
>>>
>>> In order to suppress the warnings, we simply replace the integer
>>> constant 0 with NULL.
>> [...]
>> Oddly, you seemed to miss the one in connect.c (which my sparse does
>> detect).
>
> Ah, I saw why as soon as I finished off the rebase: that (NULL, 0) goes
> away in the very next patch, and you probably ran sparse just on the tip
> of the topic (via pu).
Yes, sorry I should have mentioned that! Ahem, *blush* [Having created and
tested the patch (including running "make test") on the tip of pu, I applied
the patch directly to commit 17243606 (using git-am). Since it applied
cleanly and git-show looked OK, I said to myself "yep, that's OK, send it" ;-) ]
> I still think it's worth fixing since we are
> squashing anyway. Junio, it will give you a trivial conflict on patch
> 16, but you can just resolve in favor of what patch 16 does. If it's
> easier, here's the revised patch 16:
So, sorry for being a bit sloppy guys!
ATB,
Ramsay Jones
next prev parent reply other threads:[~2013-02-26 19:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-23 18:44 [PATCH] pkt-line: Fix sparse errors and warnings Ramsay Jones
2013-02-23 22:31 ` Jeff King
2013-02-23 22:37 ` Jeff King
2013-02-24 8:36 ` Junio C Hamano
2013-02-26 19:02 ` Ramsay Jones [this message]
2013-02-26 18:52 ` Ramsay Jones
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=512D06E3.5020109@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.