{"thread":{"id":"27018","subject":"[PATCH 0/9] Some more sparse patches","startedAt":"2011-04-07T18:16:01Z","lastAt":"2011-04-11T18:21:13Z","messageCount":3,"participants":["Ramsay Jones","Stephen Boyd"],"isPatch":true,"patchVersion":1,"patchTotal":9},"messages":[{"id":"165366","messageId":"4D9DFF61.8090302@ramsay1.demon.co.uk","threadId":"27018","inReplyTo":null,"subject":"[PATCH 0/9] Some more sparse patches","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2011-04-07T18:16:01Z","receivedAt":"2011-04-07T18:16:01Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Hi Junio,\n\nMy (git.git) sparse branch, which I've been feeding and updating for\nover two years now, has recently started to shrink quite rapidly.\nThis (of course) is due to Stephen's recent commits (eg c2e86add\nand 52d269da and 1e4cd68c). These patches are (most) of what\nremains of my sparse branch (Some are just too ugly to send :-P ).\n\n[Hmmm, I haven't read the list for a few days, so if Stephen has\nalready addressed these issues, sorry for the noise! ]\n\nI suspect it is a little too late in this cycle for patches like\nthis, but I'm hoping you won't mind parking these in pu ready for\nconsideration early in the next cycle.\n\n    [PATCH 1/9] Makefile: Use cgcc rather than sparse in the check target\n    [PATCH 2/9] sparse: Fix an \"symbol 'cmd_index_pack' not declared\" warning\n    [PATCH 3/9] sparse: Fix some \"Using plain integer as NULL pointer\" warnings\n    [PATCH 4/9] sparse: Fix an \"symbol 'format_subject' not declared\" warning\n    [PATCH 5/9] sparse: Fix an \"symbol 'merge_file' not decared\" warning\n    [PATCH 6/9] gettext.h: Avoid using a non-standard C construct\n    [PATCH 7/9] sparse: Fix errors due to missing target-specific variables\n    [PATCH 8/9] sparse: Fix some \"symbol not declared\" warnings\n    [PATCH 9/9] sparse: Fix argument number/type warnings caused by the main() macro\n\nNote that I had originally not intended to send patch #9, but I mis-counted\nthe commits when running \"format-patch\" and didn't notice for a while ...\nAlso, patch #9 is the only one specific to MinGW; I have patched support for\nMinGW into my local sparse (about two years ago...), but have not got around to\nsending those patches back upstream ... So, you may want to drop that one.\n\nAfter these patches, sparse issues no errors on Cygwin; MinGW still has about\n25 warnings (but compat/nedmalloc/malloc.c.h seems to send sparse into an\ninfinite loop); Linux has two groups of warnings as follows:\n\n    connect.c:226:39: warning: incorrect type in argument 2 (invalid types)\n    connect.c:226:39:    expected union __CONST_SOCKADDR_ARG [usertype] __addr\n    connect.c:226:39:    got struct sockaddr *ai_addr\n    daemon.c:787:36: warning: incorrect type in argument 2 (invalid types)\n    daemon.c:787:36:    expected union __CONST_SOCKADDR_ARG [usertype] __addr\n    daemon.c:787:36:    got struct sockaddr *ai_addr\n    daemon.c:918:67: warning: incorrect type in argument 2 (invalid types)\n    daemon.c:918:67:    expected union __SOCKADDR_ARG [usertype] __addr\n    daemon.c:918:67:    got struct sockaddr *<noident>\n    imap-send.c:1119:42: warning: incorrect type in argument 2 (invalid types)\n    imap-send.c:1119:42:    expected union __CONST_SOCKADDR_ARG [usertype] __addr\n    imap-send.c:1119:42:    got struct sockaddr *ai_addr\n\nThese are due to sparse not (yet) supporting transparent unions (I have a patch\nsomewhere...), and\n\n    notes.c:397:17: error: too long token expansion\n    notes-merge.c:63:9: error: too long token expansion\n    notes-merge.c:564:9: error: too long token expansion\n\nWhich is caused by overflowing an internal static buffer (again I have a patch).\n\nATB,\nRamsay Jones\n"},{"id":"165407","messageId":"4D9EB61B.6010302@gmail.com","threadId":"27018","inReplyTo":"4D9DFF61.8090302@ramsay1.demon.co.uk","subject":"Re: [PATCH 0/9] Some more sparse patches","fromName":"Stephen Boyd","fromEmail":"bebarino@gmail.com","sentAt":"2011-04-08T07:15:39Z","receivedAt":"2011-04-08T07:15:39Z","isPatch":true,"sender":{"key":"bebarino@gmail.com","avatar":"https://avatars.githubusercontent.com/u/38832?v=4"},"body":"On 04/07/2011 11:16 AM, Ramsay Jones wrote:\n> Hi Junio,\n> \n> My (git.git) sparse branch, which I've been feeding and updating for\n> over two years now, has recently started to shrink quite rapidly.\n> This (of course) is due to Stephen's recent commits (eg c2e86add\n> and 52d269da and 1e4cd68c). These patches are (most) of what\n> remains of my sparse branch (Some are just too ugly to send :-P ).\n\nYeah I was sitting on a few of these since I didn't have the time or\neffort to sort them out. Plus I have to wade through all the warnings\nthat ULONG_MAX and LONG_MAX causes on my 64 bit system causing me to\nmiss some things. Thanks for picking it up.\n\nI pulled these patches down and gave them a test. It looks good to me,\nexcept I see this when I check http.c:\n\n$ make http.sp\n    SP http.c\nbuiltin:1:9: warning: preprocessor token GIT_HTTP_USER_AGENT redefined\nbuiltin:1:9: this was the original definition\n\nAny ideas?\n"},{"id":"165640","messageId":"4DA34699.5080200@ramsay1.demon.co.uk","threadId":"27018","inReplyTo":"4D9EB61B.6010302@gmail.com","subject":"Re: [PATCH 0/9] Some more sparse patches","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2011-04-11T18:21:13Z","receivedAt":"2011-04-11T18:21:13Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Stephen Boyd wrote:\n> Yeah I was sitting on a few of these since I didn't have the time or\n> effort to sort them out. Plus I have to wade through all the warnings\n> that ULONG_MAX and LONG_MAX causes on my 64 bit system causing me to\n> miss some things. Thanks for picking it up.\n\nI've been thinking of getting a new laptop soon; when I do, I'll have to\nface this myself. Until then I'm firmly in 32-bit land, so I'm afraid\nthat I can't help :-(\n\n> I pulled these patches down and gave them a test. It looks good to me,\n> except I see this when I check http.c:\n> \n> $ make http.sp\n>     SP http.c\n> builtin:1:9: warning: preprocessor token GIT_HTTP_USER_AGENT redefined\n> builtin:1:9: this was the original definition\n> \n> Any ideas?\n\nHmm, sorry no. I'm not seeing this on any of my platforms. On Linux and\nCygwin sparse is silent, and on MinGW (which has NO_CURL defined BTW) I\nsee a few legitimate warnings, thus:\n\n    $ make http.sp\n        SP http.c\n    http.c:806:25: warning: expression using sizeof on a function\n    http.c:815:25: warning: expression using sizeof on a function\n    http.c:1139:9: warning: expression using sizeof on a function\n    http.c:1303:9: warning: expression using sizeof on a function\n\nAgain, these warnings are legit (they relate to an insane \"inline\"\noptimization macro which uses sizeof on a function pointer).\n\nATB,\nRamsay Jones\n"}]}