Re: [PATCH] pkt-line: Fix sparse errors and warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]