mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-29 01:24:51 +02:00
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.
This commit is contained in:
+2
-2
@@ -40,7 +40,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define DEREF(ptr,offset) ((ptr)+(offset))
|
||||
#define DEREF(ptr,offset) (((char*)ptr)+(offset))
|
||||
|
||||
static char rcsid[] = "$Header$";
|
||||
#include <string.h>
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user