Fixed some warnings

As referenced in GitHub issue #83
This commit is contained in:
Phil Nash 2012-05-11 19:05:53 +01:00
parent 15140eacd7
commit 8d69208a58
4 changed files with 8 additions and 6 deletions

View File

@ -67,9 +67,9 @@ namespace Catch
struct SourceLineInfo struct SourceLineInfo
{ {
SourceLineInfo() : line( 0 ){} SourceLineInfo() : line( 0 ){}
SourceLineInfo( const std::string& file, std::size_t line ) SourceLineInfo( const std::string& _file, std::size_t _line )
: file( file ), : file( _file ),
line( line ) line( _line )
{} {}
SourceLineInfo( const SourceLineInfo& other ) SourceLineInfo( const SourceLineInfo& other )
: file( other.file ), : file( other.file ),

View File

@ -103,7 +103,7 @@ inline std::string toString( unsigned long value ) {
} }
inline std::string toString( unsigned int value ) { inline std::string toString( unsigned int value ) {
return toString( (unsigned long)value ); return toString( static_cast<unsigned long>( value ) );
} }
inline std::string toString( const double value ) { inline std::string toString( const double value ) {

View File

@ -247,12 +247,12 @@ namespace Catch
m_config.stream() << resultInfo.getExpression(); m_config.stream() << resultInfo.getExpression();
if( resultInfo.ok() ) if( resultInfo.ok() )
{ {
TextColour colour( TextColour::Success ); TextColour successColour( TextColour::Success );
m_config.stream() << " succeeded"; m_config.stream() << " succeeded";
} }
else else
{ {
TextColour colour( TextColour::Error ); TextColour errorColour( TextColour::Error );
m_config.stream() << " failed"; m_config.stream() << " failed";
} }
} }

View File

@ -376,6 +376,7 @@
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_SHADOW = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7; MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
@ -400,6 +401,7 @@
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_SHADOW = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7; MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx; SDKROOT = macosx;