umm_malloc icon indicating copy to clipboard operation
umm_malloc copied to clipboard

pointer of type 'void *' used in subtraction

Open jd4ever opened this issue 8 years ago • 1 comments

Hi Dmitry,

Is there a way to get around the following error (without suppressing warnings in the compiler)?

CC app/umm_malloc.c
app/umm_malloc.c: In function 'umm_free':
app/umm_malloc.c:799:12: error: pointer of type 'void *' used in subtraction [-Werror=pointer-arith]
    c = (ptr-(void *)(&(umm_heap[0])))/sizeof(umm_block);
            ^
app/umm_malloc.c: In function 'umm_realloc':
app/umm_malloc.c:1035:12: error: pointer of type 'void *' used in subtraction [-Werror=pointer-arith]
    c = (ptr-(void *)(&(umm_heap[0])))/sizeof(umm_block);
            ^
cc1: all warnings being treated as errors
make: *** [out/build/app/umm_malloc.o] Error 1

Thanks, John

jd4ever avatar Mar 26 '16 22:03 jd4ever

Hi John,

Please use this repository instead: https://github.com/rhempel/umm_malloc , it is initiated by the original author of umm_malloc after I published my own, and I've done a bunch of improvements there.

In particular, the issue you're talking about is fixed as well.

Sorry, I should have indicated here that the repository is obsolete.

dimonomid avatar Mar 27 '16 07:03 dimonomid