fixed a variable set but unused warning
Merge pull request #412 from yaoweibin/fixed_warning

fixed a variable set but unused warning