{"thread":{"id":"41457","subject":"[PATCH] daemon.c: mark a file-local symbol as static","startedAt":"2016-02-21T17:33:38Z","lastAt":"2016-02-23T00:49:53Z","messageCount":5,"participants":["Ramsay Jones","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"278759","messageId":"56C9F4F2.1060100@ramsayjones.plus.com","threadId":"41457","inReplyTo":null,"subject":"[PATCH] daemon.c: mark a file-local symbol as static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-02-21T17:33:38Z","receivedAt":"2016-02-21T17:33:38Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Jeff,\n\nIf you need to re-roll your 'jk/tighten-alloc' branch, could you\nplease squash this into the relevant patch. (ie. \"convert manual\nallocations to argv_array\").\n\nThanks!\n\nATB,\nRamsay Jones\n\n daemon.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/daemon.c b/daemon.c\nindex 3f57adb..8d45c33 100644\n--- a/daemon.c\n+++ b/daemon.c\n@@ -808,7 +808,7 @@ static void check_dead_children(void)\n \t\t\tcradle = &blanket->next;\n }\n \n-struct argv_array cld_argv = ARGV_ARRAY_INIT;\n+static struct argv_array cld_argv = ARGV_ARRAY_INIT;\n static void handle(int incoming, struct sockaddr *addr, socklen_t addrlen)\n {\n \tstruct child_process cld = CHILD_PROCESS_INIT;\n-- \n2.7.0\n"},{"id":"278793","messageId":"20160221232510.GB4094@sigill.intra.peff.net","threadId":"41457","inReplyTo":"56C9F4F2.1060100@ramsayjones.plus.com","subject":"Re: [PATCH] daemon.c: mark a file-local symbol as static","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-02-21T23:25:10Z","receivedAt":"2016-02-21T23:25:10Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Feb 21, 2016 at 05:33:38PM +0000, Ramsay Jones wrote:\n\n> If you need to re-roll your 'jk/tighten-alloc' branch, could you\n> please squash this into the relevant patch. (ie. \"convert manual\n> allocations to argv_array\").\n\nThanks, will do. You notice these with sparse, as I recall? I've meant\nto look into running that myself, but it looks like we are not\nwarning-free with sparse currently. I see complaints like:\n\n  connect.c:377:40: warning: incorrect type in argument 2 (invalid types)\n  connect.c:377:40:    expected union __CONST_SOCKADDR_ARG [usertype] __addr\n  connect.c:377:40:    got struct sockaddr *ai_addr\n\nAs far as I can tell, that's just noise. Do you have a ready-made recipe\nfor silencing it?\n\n-Peff\n"},{"id":"278807","messageId":"56CA5753.9030308@ramsayjones.plus.com","threadId":"41457","inReplyTo":"20160221232510.GB4094@sigill.intra.peff.net","subject":"Re: [PATCH] daemon.c: mark a file-local symbol as static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-02-22T00:33:23Z","receivedAt":"2016-02-22T00:33:23Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 21/02/16 23:25, Jeff King wrote:\n> On Sun, Feb 21, 2016 at 05:33:38PM +0000, Ramsay Jones wrote:\n> \n>> If you need to re-roll your 'jk/tighten-alloc' branch, could you\n>> please squash this into the relevant patch. (ie. \"convert manual\n>> allocations to argv_array\").\n> \n> Thanks, will do. You notice these with sparse, as I recall? I've meant\n> to look into running that myself, but it looks like we are not\n> warning-free with sparse currently. I see complaints like:\n> \n>   connect.c:377:40: warning: incorrect type in argument 2 (invalid types)\n>   connect.c:377:40:    expected union __CONST_SOCKADDR_ARG [usertype] __addr\n>   connect.c:377:40:    got struct sockaddr *ai_addr\n> \n> As far as I can tell, that's just noise. Do you have a ready-made recipe\n> for silencing it?\n\nAh, I think you must be on a very old version of sparse.\n\nI tend to run a (non-released, reasonably) up-to-date version built\ndirectly from the sparse repo at:\n\n    git://git.kernel.org/pub/scm/devel/sparse/sparse.git\n\n[You just prompted me to check, I'm running version v0.5.0-30-gca3309e\nwhich is actually a little behind master, which is v0.5.0-44-g40791b9.\nThis is even further behind the maintainers master branch.]\n\nOn Linux, there is a single warning, which results from a hard-coded\nvalue (max size of memcpy et. al., used for the kernel) which should\nat least be settable from the command line (I have a patch somewhere\nwhich I have not sent upstream).\n\nOn cygwin, currently, there are several other warnings, which can be\nsilenced by fixups to sparse (again I have some patches ...)\n\n(Also, static-check.pl comes in handy for these types of 'problem'.)\n\nHTH\n\nATB,\nRamsay Jones\n"},{"id":"278904","messageId":"20160222211827.GB15595@sigill.intra.peff.net","threadId":"41457","inReplyTo":"56CA5753.9030308@ramsayjones.plus.com","subject":"Re: [PATCH] daemon.c: mark a file-local symbol as static","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-02-22T21:18:27Z","receivedAt":"2016-02-22T21:18:27Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Feb 22, 2016 at 12:33:23AM +0000, Ramsay Jones wrote:\n\n> > Thanks, will do. You notice these with sparse, as I recall? I've meant\n> > to look into running that myself, but it looks like we are not\n> > warning-free with sparse currently. I see complaints like:\n> > \n> >   connect.c:377:40: warning: incorrect type in argument 2 (invalid types)\n> >   connect.c:377:40:    expected union __CONST_SOCKADDR_ARG [usertype] __addr\n> >   connect.c:377:40:    got struct sockaddr *ai_addr\n> > \n> > As far as I can tell, that's just noise. Do you have a ready-made recipe\n> > for silencing it?\n> \n> Ah, I think you must be on a very old version of sparse.\n\nI have whatever comes with debian unstable. Looks like 0.5.0 from\nNovember. So not _that_ old, but I can well believe it is missing tweaks\nfound at the tip of their development.\n\nI guess I was wondering whether I should be adding \"make sparse\" to my\nset of pre-submission checks. But I can't say I'm enthused about\nmanually keeping another tool up to date. :)\n\n> On Linux, there is a single warning, which results from a hard-coded\n> value (max size of memcpy et. al., used for the kernel) which should\n> at least be settable from the command line (I have a patch somewhere\n> which I have not sent upstream).\n\nYeah, I saw that one, for a large zeroing memset of a heap buffer. I\ndon't think it's _wrong_, though it would probably not hurt to use\nxcalloc instead.\n\nThanks for the pointers.\n\n-Peff\n"},{"id":"278956","messageId":"56CBACB1.8070109@ramsayjones.plus.com","threadId":"41457","inReplyTo":"20160222211827.GB15595@sigill.intra.peff.net","subject":"Re: [PATCH] daemon.c: mark a file-local symbol as static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-02-23T00:49:53Z","receivedAt":"2016-02-23T00:49:53Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 22/02/16 21:18, Jeff King wrote:\n> On Mon, Feb 22, 2016 at 12:33:23AM +0000, Ramsay Jones wrote:\n> \n>>> Thanks, will do. You notice these with sparse, as I recall? I've meant\n>>> to look into running that myself, but it looks like we are not\n>>> warning-free with sparse currently. I see complaints like:\n>>>\n>>>   connect.c:377:40: warning: incorrect type in argument 2 (invalid types)\n>>>   connect.c:377:40:    expected union __CONST_SOCKADDR_ARG [usertype] __addr\n>>>   connect.c:377:40:    got struct sockaddr *ai_addr\n>>>\n>>> As far as I can tell, that's just noise. Do you have a ready-made recipe\n>>> for silencing it?\n>>\n>> Ah, I think you must be on a very old version of sparse.\n> \n> I have whatever comes with debian unstable. Looks like 0.5.0 from\n> November. So not _that_ old, but I can well believe it is missing tweaks\n> found at the tip of their development.\n\nYes, but that version was released in Jan 2014!\n\n> I guess I was wondering whether I should be adding \"make sparse\" to my\n> set of pre-submission checks. But I can't say I'm enthused about\n> manually keeping another tool up to date. :)\n\nHmm, probably not worth it - I sometimes wonder why I bother! :-D\n\nATB,\nRamsay Jones\n"}]}