supress cast warning on C++.