{"thread":{"id":"47610","subject":"[PATCH] Removed unnecessary void* from hashmap.h that caused compile warnings","startedAt":"2018-01-14T18:08:10Z","lastAt":"2018-01-16T22:28:47Z","messageCount":5,"participants":["randall.s.becker@rogers.com","Thomas Gummerer","Randall S. Becker","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"336594","messageId":"20180114180748.14584-1-randall.s.becker@rogers.com","threadId":"47610","inReplyTo":null,"subject":"[PATCH] Removed unnecessary void* from hashmap.h that caused compile warnings","fromName":"","fromEmail":"randall.s.becker@rogers.com","sentAt":"2018-01-14T18:07:48Z","receivedAt":"2018-01-14T18:08:10Z","isPatch":true,"sender":{"key":"randall.s.becker@rogers.com","avatar":null},"body":"From: \"Randall S. Becker\" <rsbecker@nexbridge.com>\n\n* hashmap.h: Revised the while loop in the hashmap_enable_item_counting\n\tto remove unneeded void* item.\n\nSigned-off-by: Randall S. Becker <rsbecker@nexbridge.com>\n---\n hashmap.h | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/hashmap.h b/hashmap.h\nindex 7ce79f3..d375d9c 100644\n--- a/hashmap.h\n+++ b/hashmap.h\n@@ -400,7 +400,6 @@ static inline void hashmap_disable_item_counting(struct hashmap *map)\n  */\n static inline void hashmap_enable_item_counting(struct hashmap *map)\n {\n-\tvoid *item;\n \tunsigned int n = 0;\n \tstruct hashmap_iter iter;\n \n@@ -408,7 +407,7 @@ static inline void hashmap_enable_item_counting(struct hashmap *map)\n \t\treturn;\n \n \thashmap_iter_init(map, &iter);\n-\twhile ((item = hashmap_iter_next(&iter)))\n+\twhile (hashmap_iter_next(&iter))\n \t\tn++;\n \n \tmap->do_count_items = 1;\n-- \n2.8.5.23.g6fa7ec3\n\n"},{"id":"336625","messageId":"20180115204301.GL2641@hank","threadId":"47610","inReplyTo":"20180114180748.14584-1-randall.s.becker@rogers.com","subject":"Re: [PATCH] Removed unnecessary void* from hashmap.h that caused compile warnings","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2018-01-15T20:43:01Z","receivedAt":"2018-01-15T20:40:49Z","isPatch":true,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"Thanks for your patch!  A few nitpicks below:\n\n> Subject: [PATCH] Removed unnecessary void* from hashmap.h that caused compile warnings\n\nFrom Documentation/SubmittingPatches:\n\n    Describe your changes in imperative mood, e.g. \"make xyzzy do frotz\"\n    instead of \"[This patch] makes xyzzy do frotz\" or \"[I] changed xyzzy\n    to do frotz\", as if you are giving orders to the codebase to change\n    its behavior.\n\nI liked the subject Philip suggested in the other thread: \"hashmap.h:\nremove unnecessary void*\", or maybe \"hashmap.h: remove unnecessary\nvariable\".\n\nOn 01/14, randall.s.becker@rogers.com wrote:\n> From: \"Randall S. Becker\" <rsbecker@nexbridge.com>\n> \n> * hashmap.h: Revised the while loop in the hashmap_enable_item_counting\n> \tto remove unneeded void* item.\n\nAs above, this should be described in an imperative mood, and describe\nwhy this is a good change and should be merged.  Maybe something along\nthe lines of the below?\n\n    In 'hashmap_enable_item_counting()', item is assigned but never\n    used.  This causes a warning on HP NonStop.  As the variable is\n    never used, fix this by just removing it.\n\n> Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>\n> ---\n>  hashmap.h | 3 +--\n>  1 file changed, 1 insertion(+), 2 deletions(-)\n> \n> diff --git a/hashmap.h b/hashmap.h\n> index 7ce79f3..d375d9c 100644\n> --- a/hashmap.h\n> +++ b/hashmap.h\n> @@ -400,7 +400,6 @@ static inline void hashmap_disable_item_counting(struct hashmap *map)\n>   */\n>  static inline void hashmap_enable_item_counting(struct hashmap *map)\n>  {\n> -\tvoid *item;\n>  \tunsigned int n = 0;\n>  \tstruct hashmap_iter iter;\n>  \n> @@ -408,7 +407,7 @@ static inline void hashmap_enable_item_counting(struct hashmap *map)\n>  \t\treturn;\n>  \n>  \thashmap_iter_init(map, &iter);\n> -\twhile ((item = hashmap_iter_next(&iter)))\n> +\twhile (hashmap_iter_next(&iter))\n>  \t\tn++;\n>  \n>  \tmap->do_count_items = 1;\n> -- \n> 2.8.5.23.g6fa7ec3\n> \n"},{"id":"336626","messageId":"007801d38e42$6b6df3b0$4249db10$@nexbridge.com","threadId":"47610","inReplyTo":"20180115204301.GL2641@hank","subject":"RE: [PATCH] Removed unnecessary void* from hashmap.h that caused compile warnings","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2018-01-15T20:49:58Z","receivedAt":"2018-01-15T20:50:10Z","isPatch":true,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On January 15, 2018 3:43 PM, Thomas Gummerer wrote:\n> Thanks for your patch!  A few nitpicks below:\n> \n> > Subject: [PATCH] Removed unnecessary void* from hashmap.h that caused\n> > compile warnings\n> \n> From Documentation/SubmittingPatches:\n> \n>     Describe your changes in imperative mood, e.g. \"make xyzzy do frotz\"\n>     instead of \"[This patch] makes xyzzy do frotz\" or \"[I] changed xyzzy\n>     to do frotz\", as if you are giving orders to the codebase to change\n>     its behavior.\n> \n> I liked the subject Philip suggested in the other thread: \"hashmap.h:\n> remove unnecessary void*\", or maybe \"hashmap.h: remove unnecessary\n> variable\".\n> \n> On 01/14, randall.s.becker@rogers.com wrote:\n> > From: \"Randall S. Becker\" <rsbecker@nexbridge.com>\n> >\n> > * hashmap.h: Revised the while loop in the\n> hashmap_enable_item_counting\n> > \tto remove unneeded void* item.\n> \n> As above, this should be described in an imperative mood, and describe why\n> this is a good change and should be merged.  Maybe something along the\n> lines of the below?\n> \n>     In 'hashmap_enable_item_counting()', item is assigned but never\n>     used.  This causes a warning on HP NonStop.  As the variable is\n>     never used, fix this by just removing it.\n> \n> > Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>\n> > ---\n> >  hashmap.h | 3 +--\n> >  1 file changed, 1 insertion(+), 2 deletions(-)\n> >\n> > diff --git a/hashmap.h b/hashmap.h\n> > index 7ce79f3..d375d9c 100644\n> > --- a/hashmap.h\n> > +++ b/hashmap.h\n> > @@ -400,7 +400,6 @@ static inline void\n> hashmap_disable_item_counting(struct hashmap *map)\n> >   */\n> >  static inline void hashmap_enable_item_counting(struct hashmap *map)\n> > {\n> > -\tvoid *item;\n> >  \tunsigned int n = 0;\n> >  \tstruct hashmap_iter iter;\n> >\n> > @@ -408,7 +407,7 @@ static inline void\n> hashmap_enable_item_counting(struct hashmap *map)\n> >  \t\treturn;\n> >\n> >  \thashmap_iter_init(map, &iter);\n> > -\twhile ((item = hashmap_iter_next(&iter)))\n> > +\twhile (hashmap_iter_next(&iter))\n> >  \t\tn++;\n> >\n> >  \tmap->do_count_items = 1;\n\nI like it. Do you need this resubmitted? Or should I just learn for next\ntime?\n\nCheers,\nRandall\n\n"},{"id":"336638","messageId":"20180115235943.GM2641@hank","threadId":"47610","inReplyTo":"007801d38e42$6b6df3b0$4249db10$@nexbridge.com","subject":"Re: [PATCH] Removed unnecessary void* from hashmap.h that caused compile warnings","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2018-01-15T23:59:43Z","receivedAt":"2018-01-15T23:57:31Z","isPatch":true,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"On 01/15, Randall S. Becker wrote:\n> On January 15, 2018 3:43 PM, Thomas Gummerer wrote:\n> > Thanks for your patch!  A few nitpicks below:\n> > \n> > > Subject: [PATCH] Removed unnecessary void* from hashmap.h that caused\n> > > compile warnings\n> > \n> > From Documentation/SubmittingPatches:\n> > \n> >     Describe your changes in imperative mood, e.g. \"make xyzzy do frotz\"\n> >     instead of \"[This patch] makes xyzzy do frotz\" or \"[I] changed xyzzy\n> >     to do frotz\", as if you are giving orders to the codebase to change\n> >     its behavior.\n> > \n> > I liked the subject Philip suggested in the other thread: \"hashmap.h:\n> > remove unnecessary void*\", or maybe \"hashmap.h: remove unnecessary\n> > variable\".\n> > \n> > On 01/14, randall.s.becker@rogers.com wrote:\n> > > From: \"Randall S. Becker\" <rsbecker@nexbridge.com>\n> > >\n> > > * hashmap.h: Revised the while loop in the\n> > hashmap_enable_item_counting\n> > > \tto remove unneeded void* item.\n> > \n> > As above, this should be described in an imperative mood, and describe why\n> > this is a good change and should be merged.  Maybe something along the\n> > lines of the below?\n> > \n> >     In 'hashmap_enable_item_counting()', item is assigned but never\n> >     used.  This causes a warning on HP NonStop.  As the variable is\n> >     never used, fix this by just removing it.\n> > \n> > > Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>\n> > >\n> > > [..snip..]\n> > >\n> I like it. Do you need this resubmitted? Or should I just learn for next\n> time?\n\nI think it would be good if you resubmit the patch.  These rules tend\nto be applied quite strictly, as you can also see when looking at the\ngit commit history.  So with the updated commit message Junio should\njust be able to pick it up (unless there's something I missed here as\nwell :))\n\nAs a side note, I just noticed the two submissions both had [PATCH] in\nthe title, whereas new submissions should be marked as such using\n[PATCH v2] etc. as prefix, so it's easier for reviewers to know which\nversion is the newer one.\n\n> Cheers,\n> Randall\n> \n"},{"id":"336679","messageId":"xmqqinc1tp4c.fsf@gitster.mtv.corp.google.com","threadId":"47610","inReplyTo":"007801d38e42$6b6df3b0$4249db10$@nexbridge.com","subject":"Re: [PATCH] Removed unnecessary void* from hashmap.h that caused compile warnings","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-01-16T22:28:35Z","receivedAt":"2018-01-16T22:28:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Randall S. Becker\" <rsbecker@nexbridge.com> writes:\n\n> I like it. Do you need this resubmitted? Or should I just learn for next\n> time?\n\nI'll queue the attached for today's iteration.  Thanks, both.\n\n-- >8 --\nFrom: \"Randall S. Becker\" <rsbecker@nexbridge.com>\nDate: Sun, 14 Jan 2018 13:07:48 -0500\nSubject: [PATCH] hashmap.h: remove unused variable\n\nIn 'hashmap_enable_item_counting()', item is assigned but never\nused.  This causes a warning on HP NonStop.  As the variable is\nnever used, fix this by just removing it.\n\nSigned-off-by: Randall S. Becker <rsbecker@nexbridge.com>\nHelped-by: Thomas Gummerer <t.gummerer@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n hashmap.h | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/hashmap.h b/hashmap.h\nindex 7cb29a6aed..c41ce392b7 100644\n--- a/hashmap.h\n+++ b/hashmap.h\n@@ -402,7 +402,6 @@ static inline void hashmap_disable_item_counting(struct hashmap *map)\n  */\n static inline void hashmap_enable_item_counting(struct hashmap *map)\n {\n-\tvoid *item;\n \tunsigned int n = 0;\n \tstruct hashmap_iter iter;\n \n@@ -410,7 +409,7 @@ static inline void hashmap_enable_item_counting(struct hashmap *map)\n \t\treturn;\n \n \thashmap_iter_init(map, &iter);\n-\twhile ((item = hashmap_iter_next(&iter)))\n+\twhile (hashmap_iter_next(&iter))\n \t\tn++;\n \n \tmap->do_count_items = 1;\n-- \n2.16.0-rc2-196-ge713b39cb6\n\n"}]}