Skip to content

Some more sparse patches

Ramsay Jones git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9Makefile: Use cgcc rather than sparse in the check targetMakefile+6 -50 replies
2/9sparse: Fix an "symbol 'cmd_index_pack' not declared" warningbuiltin/index-pack.c+1 -10 replies
3/9sparse: Fix some "Using plain integer as NULL pointer" warningsimap-send.c+2 -20 replies
4/9sparse: Fix an "symbol 'format_subject' not declared" warningbuiltin/shortlog.c commit.h+2 -30 replies
5/9sparse: Fix an "symbol 'merge_file' not decared" warningMakefile builtin/merge-tree.c merge-file.c +1 more+10 -20 replies
6/9gettext.h: Avoid using a non-standard C constructgettext.h+1 -14 replies
7/9sparse: Fix errors due to missing target-specific variablesMakefile+25 -152 replies
8/9sparse: Fix some "symbol not declared" warningsattr.c vcs-svn/svndump.c+3 -20 replies
9/9sparse: Fix argument number/type warnings caused by the main() macrocompat/mingw.h fast-import.c git.c +3 more+10 -70 replies

Reviews trailers per patch

1 of 9 patches has a Reviewed-by or Acked-by.

PatchJonathan NiederÆvar Arnfjörð Bjarmason
1/9
2/9
3/9
4/9
5/9
6/9A-b A-b
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/9] Some more sparse patches

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