From e81c0aef39ab3127b265c5fcc2c20a857f28b474 Mon Sep 17 00:00:00 2001 From: vitaut Date: Sun, 18 Oct 2015 09:16:10 -0700 Subject: [PATCH] Fix bogus coverity warnings. --- test/test-main.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/test-main.cc b/test/test-main.cc index 9f5426ee..350044da 100644 --- a/test/test-main.cc +++ b/test/test-main.cc @@ -25,6 +25,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #ifdef _WIN32 @@ -52,5 +53,10 @@ int main(int argc, char **argv) { _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + try { + return RUN_ALL_TESTS(); + } catch (...) { + // Catch all exceptions to make Coverity happy. + } + return EXIT_FAILURE; }