Author: sebor
Date: Sat Jan 7 16:19:39 2006
New Revision: 366950
URL: http://svn.apache.org/viewcvs?rev=366950&view=rev
Log:
2006-01-07 Martin Sebor <[EMAIL PROTECTED]>
* valcmp.cpp (rw_dblcm): Silenced a SunPro 5.7 Warning: Conversion
of 64 bit type value to "int" causes truncation.
Modified:
incubator/stdcxx/trunk/tests/src/valcmp.cpp
Modified: incubator/stdcxx/trunk/tests/src/valcmp.cpp
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/src/valcmp.cpp?rev=366950&r1=366949&r2=366950&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/src/valcmp.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/valcmp.cpp Sat Jan 7 16:19:39 2006
@@ -795,7 +795,10 @@
const IntT int_diff = x_int - y_int;
- return int_diff;
+ // cast a possibly wider type to int to avoid compiler warnings
+ // this should be safe since the function should not be used to
+ // compare numbers that are that far apart
+ return int (int_diff);
#endif // _RWSTD_LLONG_SIZE < _RWSTD_DBL_SIZE