[Mockpp-commits] mockpp/mockpp Makefile.am,1.75,1.76 VisitableMockObject_template.h,1.23,1.24 mockpp
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-04-02 20:46:09
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3635/mockpp Modified Files: Makefile.am VisitableMockObject_template.h mockpp.cpp mockpp.h Log Message: more fixes for msvc6 Index: mockpp.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.h,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- mockpp.h 2 Apr 2005 13:46:28 -0000 1.49 +++ mockpp.h 2 Apr 2005 20:45:29 -0000 1.50 @@ -86,26 +86,30 @@ # ifdef _MSC_VER // Compilation Warning remover // needed to prevent MSVC6 complain about itself :-/ -# pragma warning (disable:4786) // this warning occurs when VC6 truncate a debug symbol which is longer than 255 chars. -# pragma warning (disable:4251) // this warning occurs when a class member doesn't have a dll-interface. -# pragma warning (disable:4180) -# pragma warning (disable:4355) -# pragma warning (disable:4512) -# pragma warning (disable:4511) -# pragma warning (disable:4018) -# pragma warning (disable:4100) -# pragma warning (disable:4663) -# pragma warning (disable:4146) -# pragma warning (disable:4244) +# pragma warning (disable:4786) // identifier was truncated to 'number' characters in the debug information +# pragma warning (disable:4251) // class 'type' needs to have dll-interface to be used by clients of class 'type2' +# pragma warning (disable:4180) // qualifier applied to function type has no meaning +# pragma warning (disable:4355) // 'this' : used in base member initializer list +# pragma warning (disable:4512) // assignment operator could not be generated +# pragma warning (disable:4511) // copy constructor could not be generated +# pragma warning (disable:4018) // signed/unsigned mismatch +# pragma warning (disable:4100) // unreferenced formal parameter +# pragma warning (disable:4663) // C++ language change: to explicitly specialize class template 'identifier' use the following syntax +# pragma warning (disable:4146) // unary minus operator applied to unsigned type, result still unsigned +# pragma warning (disable:4244) // conversion from 'type1' to 'type2', possible loss of data +# pragma warning (disable:4138) // '*/' found outside of comment +# pragma warning (disable:4516) // access-declarations are deprecated; member using-declarations provide a better alternative +# pragma warning (disable:4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2' +# pragma warning (disable:4702) // unreachable code # endif // _MSC_VER #if defined(_MSC_VER) -# if _MSC_VER <= 1200 -# define _MSC_VER_60_70 1 +# if _MSC_VER <= 1300 +# define _MSC_VER_60_70 # include <mockpp/mockpp_config-msvc_60_70.h> -# else defined(_MSC_VER) -# include <mockpp/mockpp_config-msvc_71.h> +# else +# include <mockpp/mockpp_config-msvc_71.h> # endif #elif defined(__BORLANDC__) @@ -127,6 +131,7 @@ # endif #endif +/* #if defined(MOCKPP_UNICODE) # ifndef _UNICODE # define _UNICODE @@ -135,6 +140,7 @@ # define UNICODE # endif #endif +*/ #if defined(MOCKPP_UNICODE) && defined(__CYGWIN__) // probably ugly hack # define _GLIBCPP_USE_WSTRING 1 @@ -183,6 +189,10 @@ /** @def MOCKPP_UNUSED * Simple macro to suppress warnings about unused variables if possible. + * Note: This is just an empty fallback. The actual content (if any) is in the + * according config-*.h. + * Can be used without semicolon at the end since it is already contained + * in the macro. */ #ifndef MOCKPP_UNUSED #define MOCKPP_UNUSED(x) Index: mockpp.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- mockpp.cpp 25 Mar 2005 18:47:36 -0000 1.19 +++ mockpp.cpp 2 Apr 2005 20:45:29 -0000 1.20 @@ -48,10 +48,10 @@ num = s.substr(0, pos); if (num.length() == 0) good = false; -#ifdef _MSC_VER_60_70 - major = atoi(num.c_str()); -#else - major = std::atoi(num.c_str()); +#ifdef _MSC_VER_60_70 // MAT using namespace std; instead ? EA: no :-) + major = atoi(num.c_str()); +#else + major = std::atoi(num.c_str()); #endif s.erase(0, pos+1); unsigned pos = s.find('.'); @@ -61,20 +61,20 @@ num = s.substr(0, pos); if (num.length() == 0) good = false; -#ifdef _MSC_VER_60_70 - minor = atoi(num.c_str()); -#else - minor = std::atoi(num.c_str()); -#endif +#ifdef _MSC_VER_60_70 + minor = atoi(num.c_str()); +#else + minor = std::atoi(num.c_str()); +#endif s.erase(0, pos+1); if (s.length() == 0) good = false; -#ifdef _MSC_VER_60_70 - patch = atoi(s.c_str()); -#else - patch = std::atoi(s.c_str()); -#endif +#ifdef _MSC_VER_60_70 + patch = atoi(s.c_str()); +#else + patch = std::atoi(s.c_str()); +#endif } else good = false; Index: VisitableMockObject_template.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockObject_template.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- VisitableMockObject_template.h 27 Feb 2005 18:04:29 -0000 1.23 +++ VisitableMockObject_template.h 2 Apr 2005 20:45:29 -0000 1.24 @@ -370,10 +370,10 @@ { counter.clear(); tvec.clear(); - for (unsigned i =0; i < t1vec.size(); ++i) - delete t1vec[i]; - for (unsigned i =0; i < t2vec.size(); ++i) - delete t2vec[i]; + for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) + delete t1vec[i1]; + for (unsigned i2 = 0; i2 < t2vec.size(); ++i2) + delete t2vec[i2]; t1vec.clear(); t2vec.clear(); } @@ -614,12 +614,12 @@ { counter.clear(); tvec.clear(); - for (unsigned i =0; i < t1vec.size(); ++i) - delete t1vec[i]; - for (unsigned i =0; i < t2vec.size(); ++i) - delete t2vec[i]; - for (unsigned i =0; i < t3vec.size(); ++i) - delete t3vec[i]; + for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) + delete t1vec[i1]; + for (unsigned i2 = 0; i2 < t2vec.size(); ++i2) + delete t2vec[i2]; + for (unsigned i3 = 0; i3 < t3vec.size(); ++i3) + delete t3vec[i3]; t1vec.clear(); t2vec.clear(); t3vec.clear(); @@ -878,14 +878,14 @@ { counter.clear(); tvec.clear(); - for (unsigned i =0; i < t1vec.size(); ++i) - delete t1vec[i]; - for (unsigned i =0; i < t2vec.size(); ++i) - delete t2vec[i]; - for (unsigned i =0; i < t3vec.size(); ++i) - delete t3vec[i]; - for (unsigned i =0; i < t4vec.size(); ++i) - delete t4vec[i]; + for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) + delete t1vec[i1]; + for (unsigned i2 = 0; i2 < t2vec.size(); ++i2) + delete t2vec[i2]; + for (unsigned i3 = 0; i3 < t3vec.size(); ++i3) + delete t3vec[i3]; + for (unsigned i4 = 0; i4 < t4vec.size(); ++i4) + delete t4vec[i4]; t1vec.clear(); t2vec.clear(); t3vec.clear(); @@ -1164,16 +1164,16 @@ { counter.clear(); tvec.clear(); - for (unsigned i =0; i < t1vec.size(); ++i) - delete t1vec[i]; - for (unsigned i =0; i < t2vec.size(); ++i) - delete t2vec[i]; - for (unsigned i =0; i < t3vec.size(); ++i) - delete t3vec[i]; - for (unsigned i =0; i < t4vec.size(); ++i) - delete t4vec[i]; - for (unsigned i =0; i < t5vec.size(); ++i) - delete t5vec[i]; + for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) + delete t1vec[i1]; + for (unsigned i2 = 0; i2 < t2vec.size(); ++i2) + delete t2vec[i2]; + for (unsigned i3 = 0; i3 < t3vec.size(); ++i3) + delete t3vec[i3]; + for (unsigned i4 = 0; i4 < t4vec.size(); ++i4) + delete t4vec[i4]; + for (unsigned i5 = 0; i5 < t5vec.size(); ++i5) + delete t5vec[i5]; t1vec.clear(); t2vec.clear(); t3vec.clear(); Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Makefile.am,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- Makefile.am 2 Apr 2005 13:46:27 -0000 1.75 +++ Makefile.am 2 Apr 2005 20:45:28 -0000 1.76 @@ -149,47 +149,7 @@ echo "#define HAVE_STD_WCSCMP" >>$@ echo "" >>$@ echo "/* Define to supress compiler warnings about unused variables. */" >>$@ - echo "#define MOCKPP_UNUSED(x) x" >>$@ - echo "" >>$@ - -test $@ -ef $(srcdir) || cp $@ $(srcdir) - -mockpp_config-cygwin.h: - echo "// #define's for Cygwin" >$@ - echo "// derived from automatically generated config.h. See Makefile.am." >>$@ - TODAY=`date +%Y-%m-%d` ; echo "/* Generated: $$TODAY */" >>$@ - echo "" >>$@ - echo "/* Define to turn debugging globally on. */" >>$@ - echo "#undef DEBUG" >>$@ - echo "" >>$@ - echo "/* Version number of package */" >>$@ - echo "#define MOCKPP_VERSION \"$(VERSION)\"" >>$@ - echo "" >>$@ - echo "/* Name of package */" >>$@ - echo "#define MOCKPP_PACKAGE \"$(PACKAGE)\"" >>$@ - echo "" >>$@ - echo "/* Define if you have CppUnit installed. */" >>$@ - echo "#define HAVE_CPPUNIT" >>$@ - echo "" >>$@ - echo "/* Define to 1 if you have the <limits> header file. */" >>$@ - echo "#define HAVE_LIMITS" >>$@ - echo "" >>$@ - echo "/* Define to 1 if you have the <cppunit/Message.h> header file. */" >>$@ - echo "#define HAVE_CPPUNIT_MESSAGE_H 1" >>$@ - echo "" >>$@ - echo "/* Define to compile for unicode environment. */" >>$@ - echo "#undef MOCKPP_UNICODE" >>$@ - echo "" >>$@ - echo "/* Define if you have the cwchar header. */" >>$@ - echo "#define HAVE_CWCHAR" >>$@ - echo "" >>$@ - echo "/* Define if you have the std::wstring type. */" >>$@ - echo "#define HAVE_WSTRING" >>$@ - echo "" >>$@ - echo "/* Define if you have the wcscmp function. */" >>$@ - echo "#define HAVE_WCSCMP" >>$@ - echo "" >>$@ - echo "/* Define if you have the std::wcscmp function. */" >>$@ - echo "#undef HAVE_STD_WCSCMP" >>$@ + echo "define MOCKPP_UNUSED(x) x;" >>$@ echo "" >>$@ -test $@ -ef $(srcdir) || cp $@ $(srcdir) @@ -232,7 +192,7 @@ echo "#define HAVE_STD_WCSCMP" >>$@ echo "" >>$@ echo "/* Define to supress compiler warnings about unused variables. */" >>$@ - echo "#define MOCKPP_UNUSED(x) x" >>$@ + echo "define MOCKPP_UNUSED(x) x;" >>$@ echo "" >>$@ -test $@ -ef $(srcdir) || cp $@ $(srcdir) @@ -278,7 +238,7 @@ echo "#undef HAVE_STD_WCSCMP" >>$@ echo "" >>$@ echo "/* Define to supress compiler warnings about unused variables. */" >>$@ - echo "#define MOCKPP_UNUSED(x) x" >>$@ + echo "define MOCKPP_UNUSED(x) x;" >>$@ echo "" >>$@ -test $@ -ef $(srcdir) || cp $@ $(srcdir) |