Fix numerous compiler warnings.