Page MenuHomePhabricator

build: fix void* use in pointer maths

Authored by zmike on May 12 2020, 6:54 AM.



void* is an invalid type for calculating pointer offsets, so ensure that
this is always cast to something else (e.g., char*) in the few cases
where it's been misused

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
zmike created this revision.May 12 2020, 6:54 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added:

zmike requested review of this revision.May 12 2020, 6:54 AM
zmike updated this revision to Diff 30244.May 12 2020, 7:53 AM

cast harder

segfaultxavi accepted this revision.May 12 2020, 8:16 AM
segfaultxavi added a subscriber: segfaultxavi.

Builds without warnings (after applying the whole stack) and passes tests.
Explicitly casting to char * makes a lot of sense, otherwise, there's a lot of implicit casting from void * that's obscure and bound to break.

This revision is now accepted and ready to land.May 12 2020, 8:16 AM
This revision was automatically updated to reflect the committed changes.