git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/9] Some more sparse patches
@ 2011-04-07 18:16 Ramsay Jones
  2011-04-08  7:15 ` Stephen Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Ramsay Jones @ 2011-04-07 18:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GIT Mailing-list, bebarino

Hi Junio,

My (git.git) sparse branch, which I've been feeding and updating for
over two years now, has recently started to shrink quite rapidly.
This (of course) is due to Stephen's recent commits (eg c2e86add
and 52d269da and 1e4cd68c). These patches are (most) of what
remains of my sparse branch (Some are just too ugly to send :-P ).

[Hmmm, I haven't read the list for a few days, so if Stephen has
already addressed these issues, sorry for the noise! ]

I suspect it is a little too late in this cycle for patches like
this, but I'm hoping you won't mind parking these in pu ready for
consideration early in the next cycle.

    [PATCH 1/9] Makefile: Use cgcc rather than sparse in the check target
    [PATCH 2/9] sparse: Fix an "symbol 'cmd_index_pack' not declared" warning
    [PATCH 3/9] sparse: Fix some "Using plain integer as NULL pointer" warnings
    [PATCH 4/9] sparse: Fix an "symbol 'format_subject' not declared" warning
    [PATCH 5/9] sparse: Fix an "symbol 'merge_file' not decared" warning
    [PATCH 6/9] gettext.h: Avoid using a non-standard C construct
    [PATCH 7/9] sparse: Fix errors due to missing target-specific variables
    [PATCH 8/9] sparse: Fix some "symbol not declared" warnings
    [PATCH 9/9] sparse: Fix argument number/type warnings caused by the main() macro

Note that I had originally not intended to send patch #9, but I mis-counted
the commits when running "format-patch" and didn't notice for a while ...
Also, patch #9 is the only one specific to MinGW; I have patched support for
MinGW into my local sparse (about two years ago...), but have not got around to
sending those patches back upstream ... So, you may want to drop that one.

After these patches, sparse issues no errors on Cygwin; MinGW still has about
25 warnings (but compat/nedmalloc/malloc.c.h seems to send sparse into an
infinite loop); Linux has two groups of warnings as follows:

    connect.c:226:39: warning: incorrect type in argument 2 (invalid types)
    connect.c:226:39:    expected union __CONST_SOCKADDR_ARG [usertype] __addr
    connect.c:226:39:    got struct sockaddr *ai_addr
    daemon.c:787:36: warning: incorrect type in argument 2 (invalid types)
    daemon.c:787:36:    expected union __CONST_SOCKADDR_ARG [usertype] __addr
    daemon.c:787:36:    got struct sockaddr *ai_addr
    daemon.c:918:67: warning: incorrect type in argument 2 (invalid types)
    daemon.c:918:67:    expected union __SOCKADDR_ARG [usertype] __addr
    daemon.c:918:67:    got struct sockaddr *<noident>
    imap-send.c:1119:42: warning: incorrect type in argument 2 (invalid types)
    imap-send.c:1119:42:    expected union __CONST_SOCKADDR_ARG [usertype] __addr
    imap-send.c:1119:42:    got struct sockaddr *ai_addr

These are due to sparse not (yet) supporting transparent unions (I have a patch
somewhere...), and

    notes.c:397:17: error: too long token expansion
    notes-merge.c:63:9: error: too long token expansion
    notes-merge.c:564:9: error: too long token expansion

Which is caused by overflowing an internal static buffer (again I have a patch).

ATB,
Ramsay Jones

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/9] Some more sparse patches
  2011-04-07 18:16 [PATCH 0/9] Some more sparse patches Ramsay Jones
@ 2011-04-08  7:15 ` Stephen Boyd
  2011-04-11 18:21   ` Ramsay Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Boyd @ 2011-04-08  7:15 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list

On 04/07/2011 11:16 AM, Ramsay Jones wrote:
> Hi Junio,
> 
> My (git.git) sparse branch, which I've been feeding and updating for
> over two years now, has recently started to shrink quite rapidly.
> This (of course) is due to Stephen's recent commits (eg c2e86add
> and 52d269da and 1e4cd68c). These patches are (most) of what
> remains of my sparse branch (Some are just too ugly to send :-P ).

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 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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/9] Some more sparse patches
  2011-04-08  7:15 ` Stephen Boyd
@ 2011-04-11 18:21   ` Ramsay Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Ramsay Jones @ 2011-04-11 18:21 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: Junio C Hamano, GIT Mailing-list

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-11 18:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-07 18:16 [PATCH 0/9] Some more sparse patches Ramsay Jones
2011-04-08  7:15 ` Stephen Boyd
2011-04-11 18:21   ` Ramsay Jones

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).