frameworks/base: Fix various aliasing violations