frameworks/base: Fix aliasing violations