mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 05:16:10 +01:00
Suppress GCC useless-cast warning from CHECK_THROWS_MATCHES
Suppress warning from GCC about useless cast in the CHECK_THROWS_MATCHES macro the same way it is already being done for the similar CHECK macros.
This commit is contained in:
parent
fa306fc85e
commit
bc63412e2a
@ -87,7 +87,10 @@ namespace Catch {
|
|||||||
Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(exceptionType) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
|
Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(exceptionType) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
|
||||||
if( catchAssertionHandler.allowThrows() ) \
|
if( catchAssertionHandler.allowThrows() ) \
|
||||||
try { \
|
try { \
|
||||||
|
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||||
|
CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \
|
||||||
static_cast<void>(__VA_ARGS__ ); \
|
static_cast<void>(__VA_ARGS__ ); \
|
||||||
|
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
|
||||||
catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \
|
catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \
|
||||||
} \
|
} \
|
||||||
catch( exceptionType const& ex ) { \
|
catch( exceptionType const& ex ) { \
|
||||||
|
Loading…
Reference in New Issue
Block a user