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
{
SourceLineInfo() : line( 0 ){}
SourceLineInfo( const std::string& file, std::size_t line )
: file( file ),
line( line )
SourceLineInfo( const std::string& _file, std::size_t _line )
: file( _file ),
line( _line )
{}
SourceLineInfo( const SourceLineInfo& other )
: file( other.file ),

View File

@ -103,7 +103,7 @@ inline std::string toString( unsigned long 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 ) {

View File

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

View File

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