diff --git a/include/wx/cppunit.h b/include/wx/cppunit.h index bd131dd57a..7e10e80a68 100644 --- a/include/wx/cppunit.h +++ b/include/wx/cppunit.h @@ -48,11 +48,21 @@ // #include "wx/beforestd.h" +#ifdef __VISUALC__ + // with cppunit 1.12 we get many bogus warnings 4701 (local variable may be + // used without having been initialized) in TestAssert.h + #pragma warning(disable:4701) +#endif + #include #include #include #include #include + +#ifdef __VISUALC__ + #pragma warning(default:4701) +#endif #include "wx/afterstd.h" #include "wx/string.h" diff --git a/tests/archive/tartest.cpp b/tests/archive/tartest.cpp index 2ff2006d8e..d0110526ff 100644 --- a/tests/archive/tartest.cpp +++ b/tests/archive/tartest.cpp @@ -59,13 +59,15 @@ CppUnit::Test *tartest::makeTest( return NULL; if (genericInterface) + { return new ArchiveTestCase( descr, new wxTarClassFactory, options, archiver, unarchiver); - else - return new ArchiveTestCase( - descr, new wxTarClassFactory, - options, archiver, unarchiver); + } + + return new ArchiveTestCase( + descr, new wxTarClassFactory, + options, archiver, unarchiver); } CPPUNIT_TEST_SUITE_REGISTRATION(tartest); diff --git a/tests/archive/ziptest.cpp b/tests/archive/ziptest.cpp index 966e6e78a0..4204c7dfb7 100644 --- a/tests/archive/ziptest.cpp +++ b/tests/archive/ziptest.cpp @@ -261,11 +261,13 @@ CppUnit::Test *ziptest::makeTest( return NULL; if (genericInterface) + { return new ArchiveTestCase( descr, new wxZipClassFactory, options, archiver, unarchiver); - else - return new ZipTestCase(descr, options, archiver, unarchiver); + } + + return new ZipTestCase(descr, options, archiver, unarchiver); } CPPUNIT_TEST_SUITE_REGISTRATION(ziptest); diff --git a/tests/regex/regextest.cpp b/tests/regex/regextest.cpp index 042741ed3e..822012b8e2 100644 --- a/tests/regex/regextest.cpp +++ b/tests/regex/regextest.cpp @@ -170,8 +170,8 @@ wxString RegExTestCase::Conv(const char *str) if (!buf || wxWcscmp(wxConvCurrent->cWX2WC(buf), wstr) != 0) return convError(); - else - return buf; + + return buf; } // Parse flags