Fix sizeof-pointer-memaccess errors