Fix some railties test warnings

Fix some railties test warnings
1. Initialize variable
2. Encapsulate variable in ()