From 7e9d4cc15e8b8a199f2c4f3d0aa1afc49c178433 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Mon, 6 Jan 2025 16:21:22 +0000 Subject: [PATCH] ihash.c: cleanup warning use of void* with pointer arithmetic Use of (void*) with pointer arithmetic warning removal. But more so as it is in a macro (all be it local to file) which will take on the form of the type passed as argument when the 'offset' looks to be always be specified in bytes. --- utils/ihash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/ihash.c b/utils/ihash.c index 65248306..13dec78d 100644 --- a/utils/ihash.c +++ b/utils/ihash.c @@ -40,7 +40,7 @@ * */ -#define DEREF(ptr,offset) ((ptr)+(offset)) +#define DEREF(ptr,offset) (((char*)ptr)+(offset)) static char rcsid[] = "$Header$"; #include @@ -178,7 +178,7 @@ void IHashDelete(IHashTable *table, void *entry) for(pp = &table->iht_table[bucket]; (*pp) && (*pp) != entry; - pp = DEREF((*pp),nextOffset)); + pp = (void**) DEREF((*pp),nextOffset)); ASSERT(*pp,"IHashDelete"); (*pp) = * (void **) DEREF(entry,nextOffset);