diff options
| author | Kasper Laudrup | 2024-09-05 11:27:24 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2024-09-06 16:04:35 +0200 |
| commit | bc63412e2a3b3e39e178ea75953522f78b840aa7 (patch) | |
| tree | c1ddf74789d5aa82fa85788b5c9ad39abb9c6558 /src/catch2 | |
| parent | fa306fc85eca7cc68a5362c503019fa823cbe411 (diff) | |
| download | catch3-bc63412e2a3b3e39e178ea75953522f78b840aa7.tar.gz | |
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.
Diffstat (limited to 'src/catch2')
| -rw-r--r-- | src/catch2/matchers/internal/catch_matchers_impl.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/catch2/matchers/internal/catch_matchers_impl.hpp b/src/catch2/matchers/internal/catch_matchers_impl.hpp index 8d013fa2..fd4aaca0 100644 --- a/src/catch2/matchers/internal/catch_matchers_impl.hpp +++ b/src/catch2/matchers/internal/catch_matchers_impl.hpp @@ -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 ); \ if( catchAssertionHandler.allowThrows() ) \ try { \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \ static_cast<void>(__VA_ARGS__ ); \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ } \ catch( exceptionType const& ex ) { \ |