supress cast warning on C++.
Merge pull request #742 from mattn/supress_cast_warnings

supress cast warning on C++.