Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.

pointer of type 'void *' used in subtraction #3

Open
jd4ever opened this issue Mar 26, 2016 · 1 comment
Open

pointer of type 'void *' used in subtraction #3

jd4ever opened this issue Mar 26, 2016 · 1 comment

Comments

@jd4ever
Copy link

jd4ever commented Mar 26, 2016

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

@dimonomid
Copy link
Owner

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants