src/borg/_hashindex.c: fix compiler warnings

The value argument of hashindex_set is causing harmless pointer type
mismatches. This resolves the issue by changing the type to void*
which silences these types of warnings.
This commit is contained in:
James Buren 2022-02-26 13:55:25 -06:00
parent eec359cf22
commit 5f3d61e2f0
1 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ static void hashindex_write(HashIndex *index, PyObject *file_py);
static uint64_t hashindex_compact(HashIndex *index);
static HashIndex *hashindex_init(int capacity, int key_size, int value_size);
static const unsigned char *hashindex_get(HashIndex *index, const unsigned char *key);
static int hashindex_set(HashIndex *index, const unsigned char *key, const unsigned char *value);
static int hashindex_set(HashIndex *index, const unsigned char *key, const void *value);
static int hashindex_delete(HashIndex *index, const unsigned char *key);
static unsigned char *hashindex_next_key(HashIndex *index, const unsigned char *key);
@ -559,7 +559,7 @@ hashindex_get(HashIndex *index, const unsigned char *key)
}
static int
hashindex_set(HashIndex *index, const unsigned char *key, const unsigned char *value)
hashindex_set(HashIndex *index, const unsigned char *key, const void *value)
{
int start_idx;
int idx = hashindex_lookup(index, key, &start_idx);