Update of /cvsroot/cppunit/cppunit/include/cppunit
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3590/include/cppunit
Modified Files:
TestAssert.h
Log Message:
* include/cppunit/config/SourcePrefix.h: disable warning #4996
(sprintf is deprecated) for visual studio 2005.
* include/cppunit/TestAssert.h: use sprintf_s instead of sprintf for
visual studio 2005.
* examples/ClockerPlugIn/ClockerPlugIn.cpp
* examples/DumperPlugIn/DumperPlugIn.cpp: use SourcePrefix.h. Fixed
wrong macro usage to implement DllMain.
* examples/msvc6/HostApp/ExamplesTestCase.h
* examples/msvc6/HostApp/ExamplesTestCase.cpp
* examples/simple/ExamplesTestCase.h
* examples/simple/ExamplesTestCase.cpp: removed divideByZero test case
as it cause some crash on some platforms.
Index: TestAssert.h
===================================================================
RCS file: /cvsroot/cppunit/cppunit/include/cppunit/TestAssert.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** TestAssert.h 27 Oct 2005 19:34:11 -0000 1.28
--- TestAssert.h 6 Nov 2005 16:58:21 -0000 1.29
***************
*** 77,81 ****
--- 77,85 ----
#endif // #ifdef DBL_DIG
char buffer[128];
+ #ifdef __STDC_SECURE_LIB__ // Use secure version with visual studio 2005 to avoid warning.
+ sprintf_s(buffer, sizeof(buffer), "%.*g", precision, x);
+ #else
sprintf(buffer, "%.*g", precision, x);
+ #endif
return buffer;
}
|