message: remove unused unsafe cast code