Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -66,11 +66,11 @@ #endif }; /* Hopefully no arch needs more than 16 bytes padding */ #define PRE_IVAR_ALIGN ((sizeof(struct pre_ivar) + 15) & ~15) -#define PRE_IVAR ((struct pre_ivar*)((char*)self - PRE_IVAR_ALIGN)) +#define PRE_IVAR ((struct pre_ivar*)(void*)((char*)self - PRE_IVAR_ALIGN)) static struct { Class isa; } alloc_failed_exception; static Class autoreleasepool = Nil; Index: src/objc_properties.m ================================================================== --- src/objc_properties.m +++ src/objc_properties.m @@ -43,11 +43,11 @@ id objc_getProperty(id self, SEL _cmd, ptrdiff_t offset, BOOL atomic) { if (atomic) { - id *ptr = (id*)((char*)self + offset); + id *ptr = (id*)(void*)((char*)self + offset); #ifdef OF_THREADS unsigned hash = SPINLOCK_HASH(ptr); assert(of_spinlock_lock(&spinlocks[hash])); @@ -59,19 +59,19 @@ #else return [[*ptr retain] autorelease]; #endif } - return *(id*)((char*)self + offset); + return *(id*)(void*)((char*)self + offset); } void objc_setProperty(id self, SEL _cmd, ptrdiff_t offset, id value, BOOL atomic, BOOL copy) { if (atomic) { - id *ptr = (id*)((char*)self + offset); + id *ptr = (id*)(void*)((char*)self + offset); #ifdef OF_THREADS unsigned hash = SPINLOCK_HASH(ptr); assert(of_spinlock_lock(&spinlocks[hash])); @@ -103,11 +103,11 @@ #endif return; } - id *ptr = (id*)((char*)self + offset); + id *ptr = (id*)(void*)((char*)self + offset); id old = *ptr; switch (copy) { case 0: *ptr = [value retain];