Subject: Re: [PATCH 0/9] Some more sparse patches

From: Ramsay Jones <[email-masked]>
Date: Mon, 11 Apr 2011 19:21:13 +0100

Stephen Boyd wrote:
> Yeah I was sitting on a few of these since I didn't have the time or
> effort to sort them out. Plus I have to wade through all the warnings
> that ULONG_MAX and LONG_MAX causes on my 64 bit system causing me to
> miss some things. Thanks for picking it up.

I've been thinking of getting a new laptop soon; when I do, I'll have to
face this myself. Until then I'm firmly in 32-bit land, so I'm afraid
that I can't help :-(

> I pulled these patches down and gave them a test. It looks good to me,
> except I see this when I check http.c:
> 
> $ make http.sp
>     SP http.c
> builtin:1:9: warning: preprocessor token GIT_HTTP_USER_AGENT redefined
> builtin:1:9: this was the original definition
> 
> Any ideas?

Hmm, sorry no. I'm not seeing this on any of my platforms. On Linux and
Cygwin sparse is silent, and on MinGW (which has NO_CURL defined BTW) I
see a few legitimate warnings, thus:

    $ make http.sp
        SP http.c
    http.c:806:25: warning: expression using sizeof on a function
    http.c:815:25: warning: expression using sizeof on a function
    http.c:1139:9: warning: expression using sizeof on a function
    http.c:1303:9: warning: expression using sizeof on a function

Again, these warnings are legit (they relate to an insane "inline"
optimization macro which uses sizeof on a function pointer).

ATB,
Ramsay Jones