Ported arm64 compile warning fixes from upstream