Page MenuHomePhabricator

build: fix void* use in pointer maths
ClosedPublic

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

Details

Summary

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

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
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: https://phab.enlightenment.org/w/maintainers_reviewers/

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.