Got rid of some warnings

This commit is contained in:
Phil Nash 2012-08-27 21:48:15 +01:00
parent ecf934b045
commit 78c92e68aa
3 changed files with 27 additions and 9 deletions

View File

@ -317,7 +317,7 @@ namespace Catch {
return "!TBD"; return "!TBD";
} }
virtual void parseIntoConfig( const Command& cmd, ConfigData& config ) { virtual void parseIntoConfig( const Command&, ConfigData& config ) {
config.includeWhichResults = Include::SuccessfulResults; config.includeWhichResults = Include::SuccessfulResults;
} }
}; };
@ -335,7 +335,7 @@ namespace Catch {
return "!TBD"; return "!TBD";
} }
virtual void parseIntoConfig( const Command& cmd, ConfigData& config ) { virtual void parseIntoConfig( const Command&, ConfigData& config ) {
config.shouldDebugBreak = true; config.shouldDebugBreak = true;
} }
}; };
@ -397,7 +397,7 @@ namespace Catch {
return "!TBD"; return "!TBD";
} }
virtual void parseIntoConfig( const Command& cmd, ConfigData& config ) { virtual void parseIntoConfig( const Command&, ConfigData& config ) {
config.allowThrows = false; config.allowThrows = false;
} }
}; };

View File

@ -50,6 +50,11 @@ namespace Catch {
} }
private: private:
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunreachable-code"
#endif
bool isMatch( const TestCaseInfo& testCase ) const { bool isMatch( const TestCaseInfo& testCase ) const {
const std::string& name = testCase.getName(); const std::string& name = testCase.getName();
@ -63,9 +68,13 @@ namespace Catch {
case WildcardAtBothEnds: case WildcardAtBothEnds:
return contains( name, m_stringToMatch ); return contains( name, m_stringToMatch );
} }
throw std::logic_error( "Unhandled wildcard type" );
} }
#ifdef __clang__
#pragma clang diagnostic pop
#endif
std::string m_stringToMatch; std::string m_stringToMatch;
IfFilterMatches::DoWhat m_filterType; IfFilterMatches::DoWhat m_filterType;
WildcardPosition m_wildcardPosition; WildcardPosition m_wildcardPosition;

View File

@ -1,5 +1,5 @@
/* /*
* Generated: 2012-08-27 21:42:22.556899 * Generated: 2012-08-27 21:47:53.626062
* ---------------------------------------------------------- * ----------------------------------------------------------
* This file has been merged from multiple headers. Please don't edit it directly * This file has been merged from multiple headers. Please don't edit it directly
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
@ -2271,6 +2271,11 @@ namespace Catch {
} }
private: private:
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunreachable-code"
#endif
bool isMatch( const TestCaseInfo& testCase ) const { bool isMatch( const TestCaseInfo& testCase ) const {
const std::string& name = testCase.getName(); const std::string& name = testCase.getName();
@ -2284,9 +2289,13 @@ namespace Catch {
case WildcardAtBothEnds: case WildcardAtBothEnds:
return contains( name, m_stringToMatch ); return contains( name, m_stringToMatch );
} }
throw std::logic_error( "Unhandled wildcard type" );
} }
#ifdef __clang__
#pragma clang diagnostic pop
#endif
std::string m_stringToMatch; std::string m_stringToMatch;
IfFilterMatches::DoWhat m_filterType; IfFilterMatches::DoWhat m_filterType;
WildcardPosition m_wildcardPosition; WildcardPosition m_wildcardPosition;
@ -2780,7 +2789,7 @@ namespace Catch {
return "!TBD"; return "!TBD";
} }
virtual void parseIntoConfig( const Command& cmd, ConfigData& config ) { virtual void parseIntoConfig( const Command&, ConfigData& config ) {
config.includeWhichResults = Include::SuccessfulResults; config.includeWhichResults = Include::SuccessfulResults;
} }
}; };
@ -2798,7 +2807,7 @@ namespace Catch {
return "!TBD"; return "!TBD";
} }
virtual void parseIntoConfig( const Command& cmd, ConfigData& config ) { virtual void parseIntoConfig( const Command&, ConfigData& config ) {
config.shouldDebugBreak = true; config.shouldDebugBreak = true;
} }
}; };
@ -2860,7 +2869,7 @@ namespace Catch {
return "!TBD"; return "!TBD";
} }
virtual void parseIntoConfig( const Command& cmd, ConfigData& config ) { virtual void parseIntoConfig( const Command&, ConfigData& config ) {
config.allowThrows = false; config.allowThrows = false;
} }
}; };