Fixed more warnings and applied workaround for getting to std::numeric_limits without clashing with Windows' min() and max() macros.

This commit is contained in:
Phil Nash
2011-02-16 19:02:09 +00:00
parent dea778138e
commit 73acd945cd
18 changed files with 55 additions and 22 deletions

View File

@@ -53,7 +53,7 @@ namespace Catch
delete it->second;
}
}
}
#ifdef __GNUC__
#define ATTRIBUTE_NORETURN __attribute__ ((noreturn))
@@ -61,4 +61,5 @@ namespace Catch
#define ATTRIBUTE_NORETURN
#endif
#endif // TWOBLUECUBES_CATCH_COMMON_H_INCLUDED
#endif // TWOBLUECUBES_CATCH_COMMON_H_INCLUDED

View File

@@ -36,6 +36,9 @@ namespace Catch
static Hub& me();
Hub( const Hub& );
void operator=( const Hub& );
public:
static void setRunner
@@ -85,4 +88,4 @@ namespace Catch
};
}
#endif // TWOBLUECUBES_CATCH_HUB_H_INCLUDED
#endif // TWOBLUECUBES_CATCH_HUB_H_INCLUDED

View File

@@ -57,4 +57,4 @@ namespace Catch
#endif // TWOBLUECUBES_CATCH_INTERFACES_TESTCASE_H_INCLUDED
#endif // TWOBLUECUBES_CATCH_INTERFACES_TESTCASE_H_INCLUDED

View File

@@ -51,7 +51,7 @@ namespace Catch
if( ( config.listWhat() & Config::List::All ) == 0 )
{
std::cerr << "Unknown list type" << std::endl;
return std::numeric_limits<int>::max();
return (std::numeric_limits<int>::max)();
}
if( config.getReporter() )

View File

@@ -66,4 +66,4 @@ namespace Catch
};
}
#endif // TWOBLUECUBES_CATCH_REPORTER_REGISTRY_HPP_INCLUDED
#endif // TWOBLUECUBES_CATCH_REPORTER_REGISTRY_HPP_INCLUDED

View File

@@ -53,7 +53,7 @@ namespace Catch
if( pbase() == epptr() )
m_writer( std::string( 1, static_cast<char>( c ) ) );
else
sputc( c );
sputc( static_cast<char>( c ) );
}
return 0;
}
@@ -87,4 +87,4 @@ namespace Catch
};
}
#endif // TWOBLUECUBES_CATCH_STREAM_HPP_INCLUDED
#endif // TWOBLUECUBES_CATCH_STREAM_HPP_INCLUDED

View File

@@ -159,4 +159,4 @@ namespace Catch
}
#endif // TWOBLUECUBES_CATCH_TESTCASEINFO_HPP_INCLUDED
#endif // TWOBLUECUBES_CATCH_TESTCASEINFO_HPP_INCLUDED