From 02a69b449f59605cf9fa7f865a3b6daa8d104a79 Mon Sep 17 00:00:00 2001 From: Alexander Ryabykin Date: Fri, 27 Jan 2017 11:32:58 +0300 Subject: [PATCH] Compilation warnings fix (#791) * Compilation warnings fix * Removed unused argument from reportFatal function --- include/internal/catch_common.hpp | 2 +- include/internal/catch_fatal_condition.hpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/internal/catch_common.hpp b/include/internal/catch_common.hpp index 2af51a12..84fe8e48 100644 --- a/include/internal/catch_common.hpp +++ b/include/internal/catch_common.hpp @@ -28,7 +28,7 @@ namespace Catch { return s.find( infix ) != std::string::npos; } bool contains( std::string const& s, char infix ) { - return s.find(infix); + return s.find(infix) != std::string::npos; } char toLowerCh(char c) { return static_cast( ::tolower( c ) ); diff --git a/include/internal/catch_fatal_condition.hpp b/include/internal/catch_fatal_condition.hpp index 4910242e..0bdc79b7 100644 --- a/include/internal/catch_fatal_condition.hpp +++ b/include/internal/catch_fatal_condition.hpp @@ -13,7 +13,7 @@ namespace Catch { // Report the error condition - inline void reportFatal( std::string const& message, int exitCode ) { + inline void reportFatal( std::string const& message ) { IContext& context = Catch::getCurrentContext(); IResultCapture* resultCapture = context.getResultCapture(); resultCapture->handleFatalErrorCondition( message ); @@ -49,7 +49,7 @@ namespace Catch { static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) { for (int i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs); ++i) { if (ExceptionInfo->ExceptionRecord->ExceptionCode == signalDefs[i].id) { - reportFatal(signalDefs[i].name, -i); + reportFatal(signalDefs[i].name); } } // If its not an exception we care about, pass it along. @@ -122,7 +122,7 @@ namespace Catch { } } reset(); - reportFatal(name, -sig); + reportFatal(name); raise( sig ); }