From: Junio C Hamano <gitster@pobox.com>
To: "Randall S. Becker" <rsbecker@nexbridge.com>
Cc: Thomas Gummerer <t.gummerer@gmail.com>, <git@vger.kernel.org>
Subject: Re: [PATCH] Removed unnecessary void* from hashmap.h that caused compile warnings
Date: Tue, 16 Jan 2018 14:28:35 -0800 [thread overview]
Message-ID: <xmqqinc1tp4c.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <007801d38e42$6b6df3b0$4249db10$@nexbridge.com> (Randall S. Becker's message of "Mon, 15 Jan 2018 15:49:58 -0500")
"Randall S. Becker" <rsbecker@nexbridge.com> writes:
> I like it. Do you need this resubmitted? Or should I just learn for next
> time?
I'll queue the attached for today's iteration. Thanks, both.
-- >8 --
From: "Randall S. Becker" <rsbecker@nexbridge.com>
Date: Sun, 14 Jan 2018 13:07:48 -0500
Subject: [PATCH] hashmap.h: remove unused variable
In 'hashmap_enable_item_counting()', item is assigned but never
used. This causes a warning on HP NonStop. As the variable is
never used, fix this by just removing it.
Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
Helped-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
hashmap.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hashmap.h b/hashmap.h
index 7cb29a6aed..c41ce392b7 100644
--- a/hashmap.h
+++ b/hashmap.h
@@ -402,7 +402,6 @@ static inline void hashmap_disable_item_counting(struct hashmap *map)
*/
static inline void hashmap_enable_item_counting(struct hashmap *map)
{
- void *item;
unsigned int n = 0;
struct hashmap_iter iter;
@@ -410,7 +409,7 @@ static inline void hashmap_enable_item_counting(struct hashmap *map)
return;
hashmap_iter_init(map, &iter);
- while ((item = hashmap_iter_next(&iter)))
+ while (hashmap_iter_next(&iter))
n++;
map->do_count_items = 1;
--
2.16.0-rc2-196-ge713b39cb6
prev parent reply other threads:[~2018-01-16 22:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-14 18:07 [PATCH] Removed unnecessary void* from hashmap.h that caused compile warnings randall.s.becker
2018-01-15 20:43 ` Thomas Gummerer
2018-01-15 20:49 ` Randall S. Becker
2018-01-15 23:59 ` Thomas Gummerer
2018-01-16 22:28 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqinc1tp4c.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=rsbecker@nexbridge.com \
--cc=t.gummerer@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.