Fixed multiple gcc warnings about unused params.