[Cppunit-devel] New warning with MSVC6
Brought to you by:
blep
From: CppUnit d. m. l. <cpp...@li...> - 2007-02-27 20:46:05
|
Hello. There is a new compilation warning with MSVC6 : TestAssert.cpp f:\sourceforge\cppunit\cppunit\include\cppunit\portability\floatingpoint.h(42) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) The cause is in cppunit/include/cppunit/portability/FloatingPoint.h function floatingPointIsFinite() #elif defined(CPPUNIT_HAVE__FINITE) return _finite(x); #else The _finite() return value is an int. Furthermore, casting to bool is not enough to remove the warning. The above line could be fixed with : return _finite(x) ? true : false; Could someone check this in please ? Vincent Rivière vri...@us... |