diff --git a/cli/main.cpp b/cli/main.cpp index a203c9818..7e972d5cd 100644 --- a/cli/main.cpp +++ b/cli/main.cpp @@ -110,7 +110,7 @@ int main(int argc, char* argv[]) { // MS Visual C++ memory leak debug tracing #if defined(_MSC_VER) && defined(_DEBUG) - _CrtSetDbgFlag( _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG ) | _CRTDBG_LEAK_CHECK_DF); + _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF); #endif CppCheckExecutor exec; diff --git a/test/testbufferoverrun.cpp b/test/testbufferoverrun.cpp index bbf9991db..6769e8f8e 100644 --- a/test/testbufferoverrun.cpp +++ b/test/testbufferoverrun.cpp @@ -3757,12 +3757,11 @@ private: void executionPaths4() { // Ticket #2386 - Segmentation fault upon strange syntax - epcheck("void f() {\n" - " switch ( x ) {\n" - " case struct Tree : break;\n" - " }\n" - "}"); - ASSERT_EQUALS("", errout.str()); + ASSERT_THROW(epcheck("void f() {\n" + " switch ( x ) {\n" + " case struct Tree : break;\n" + " }\n" + "}"), InternalError); } void executionPaths5() {