From 011bc5eb3e35785e3e1534f7296f0e30b8f5d3a8 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Tue, 28 May 2019 18:17:46 +0200 Subject: [PATCH] Allow the hashmap code to compile correctly in C++ --- src/hashmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hashmap.c b/src/hashmap.c index 0b74b14abf..4729ea18c4 100644 --- a/src/hashmap.c +++ b/src/hashmap.c @@ -129,8 +129,8 @@ hashmap_chunk_t *hashmap_get_chunk(hashmap_t *m) { hashmap_allocate_chunks(m, num_chunks); } - hashmap_chunk_t *res = m->graveyard; - m->graveyard = res->next; + hashmap_chunk_t *res = (hashmap_chunk_t *)m->graveyard; + m->graveyard = (hashmap_chunk_t *)res->next; res->next = NULL; return res; @@ -441,7 +441,7 @@ void hashmap_print_stats(hashmap_t *m) { } int graveyard_counter = 0; for (hashmap_chunk_t *finger = m->graveyard; finger != NULL; - finger = finger->next) { + finger = (hashmap_chunk_t *)finger->next) { graveyard_counter += 1; } message( -- GitLab