Fix VC warnings (unused variable, implicit float to int conversion, implicit double to float conversion).