From ee95f41630c8ef015aef90b36ca459e26c98b9b4 Mon Sep 17 00:00:00 2001 From: enkore Date: Mon, 9 Dec 2013 20:54:22 +0100 Subject: [PATCH] Fix gcc warning empty-body MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CATCH_BREAK_INTO_DEBUGGER() seems to eval to nothing on some systems, causing a warning like this: warning: suggest braces around empty body in an ‘if’ statement (along a stack of explanations where the expansion is done) --- include/internal/catch_capture.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/internal/catch_capture.hpp b/include/internal/catch_capture.hpp index a352a622..66feef1e 100644 --- a/include/internal/catch_capture.hpp +++ b/include/internal/catch_capture.hpp @@ -67,7 +67,7 @@ struct TestFailureException{}; /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_ACCEPT_EXPR( evaluatedExpr, resultDisposition, originalExpr ) \ if( Catch::ResultAction::Value internal_catch_action = Catch::getResultCapture().acceptExpression( evaluatedExpr, INTERNAL_CATCH_ASSERTIONINFO_NAME ) ) { \ - if( internal_catch_action & Catch::ResultAction::Debug ) CATCH_BREAK_INTO_DEBUGGER(); \ + if( internal_catch_action & Catch::ResultAction::Debug ) { CATCH_BREAK_INTO_DEBUGGER(); } \ if( internal_catch_action & Catch::ResultAction::Abort ) throw Catch::TestFailureException(); \ if( !Catch::shouldContinueOnFailure( resultDisposition ) ) throw Catch::TestFailureException(); \ Catch::isTrue( false && originalExpr ); \