Fix warning: unused parameter.
Fix warning: unused variable.
Fix type conversion warnings.