{"thread":{"id":"50213","subject":"[PATCH] revision.c: fix sparse warnings (sparse algorithm)","startedAt":"2019-01-13T20:55:18Z","lastAt":"2019-01-15T18:29:06Z","messageCount":3,"participants":["Ramsay Jones","Derrick Stolee","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"366635","messageId":"0f69cce6-a0a0-8972-93dd-5c1aa428f508@ramsayjones.plus.com","threadId":"50213","inReplyTo":null,"subject":"[PATCH] revision.c: fix sparse warnings (sparse algorithm)","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2019-01-13T20:55:12Z","receivedAt":"2019-01-13T20:55:18Z","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 Derrick,\n\nIf you need to re-roll your 'ds/push-sparse-tree-walk' branch, could\nyou please squash this into the relevant patch [commit 9949aaeef4\n(\"revision: implement sparse algorithm\", 2018-12-14)]. \n\nThis commit caused both 'sparse' and my 'static-check.pl' script to\ncomplain about the visibility of the 'map_flags' variable (it is a\nfile local variable), so one solution would be to mark it 'static'.\nHowever, it is simply not being used, so ...\n\nThanks!\n\nATB,\nRamsay Jones\n\n revision.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/revision.c b/revision.c\nindex a048da3cf5..c4982a70b1 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -114,10 +114,9 @@ static int path_and_oids_cmp(const void *hashmap_cmp_fn_data,\n \treturn strcmp(e1->path, e2->path);\n }\n \n-int map_flags = 0;\n static void paths_and_oids_init(struct hashmap *map)\n {\n-\thashmap_init(map, (hashmap_cmp_fn) path_and_oids_cmp, &map_flags, 0);\n+\thashmap_init(map, (hashmap_cmp_fn) path_and_oids_cmp, NULL, 0);\n }\n \n static void paths_and_oids_clear(struct hashmap *map)\n-- \n2.20.0\n"},{"id":"366713","messageId":"a0ace9a0-65f9-ad2e-26f8-b46e3ef0153e@gmail.com","threadId":"50213","inReplyTo":"0f69cce6-a0a0-8972-93dd-5c1aa428f508@ramsayjones.plus.com","subject":"Re: [PATCH] revision.c: fix sparse warnings (sparse algorithm)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2019-01-15T14:42:36Z","receivedAt":"2019-01-15T14:42:40Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 1/13/2019 3:55 PM, Ramsay Jones wrote:\n> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n> ---\n>\n> Hi Derrick,\n>\n> If you need to re-roll your 'ds/push-sparse-tree-walk' branch, could\n> you please squash this into the relevant patch [commit 9949aaeef4\n> (\"revision: implement sparse algorithm\", 2018-12-14)].\n>\n> This commit caused both 'sparse' and my 'static-check.pl' script to\n> complain about the visibility of the 'map_flags' variable (it is a\n> file local variable), so one solution would be to mark it 'static'.\n> However, it is simply not being used, so ...\n>\n> Thanks!\n>\n> ATB,\n> Ramsay Jones\n\nThanks, Ramsay! I'm rerolling the series today, so I will make this change.\n\n-Stolee\n\n"},{"id":"366728","messageId":"xmqqzhs1srki.fsf@gitster-ct.c.googlers.com","threadId":"50213","inReplyTo":"a0ace9a0-65f9-ad2e-26f8-b46e3ef0153e@gmail.com","subject":"Re: [PATCH] revision.c: fix sparse warnings (sparse algorithm)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-15T18:29:01Z","receivedAt":"2019-01-15T18:29:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Derrick Stolee <stolee@gmail.com> writes:\n\n> On 1/13/2019 3:55 PM, Ramsay Jones wrote:\n>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n>> ---\n>>\n>> Hi Derrick,\n>>\n>> If you need to re-roll your 'ds/push-sparse-tree-walk' branch, could\n>> you please squash this into the relevant patch [commit 9949aaeef4\n>> (\"revision: implement sparse algorithm\", 2018-12-14)].\n>>\n>> This commit caused both 'sparse' and my 'static-check.pl' script to\n>> complain about the visibility of the 'map_flags' variable (it is a\n>> file local variable), so one solution would be to mark it 'static'.\n>> However, it is simply not being used, so ...\n>>\n>> Thanks!\n>>\n>> ATB,\n>> Ramsay Jones\n>\n> Thanks, Ramsay! I'm rerolling the series today, so I will make this change.\n>\n> -Stolee\n\nThanks, both.\n"}]}