Fix type conversion warnings.
Fix warnings: unused parameters.
Fix warning: return type.
Fix warning: Initialize variable size array.
Avoid using deprecated methods.
Remove trailing semi-column.
Use right variables in tests.
Fix warnings: unused variables.