1 From 059fcd2878071616cedb5116a0b2f75b5edbdbe0 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3 Date: Sun, 6 Jul 2014 15:34:41 +0100
4 Subject: [PATCH] mark the fails as no-return
6 that might help clang scan-build understand that execution won't continue after
9 include/cppunit/Asserter.h | 13 ++++++++++---
10 1 file changed, 10 insertions(+), 3 deletions(-)
12 diff --git a/include/cppunit/Asserter.h b/include/cppunit/Asserter.h
13 index 94dadaa..ad981b5 100644
14 --- a/include/cppunit/Asserter.h
15 +++ b/include/cppunit/Asserter.h
16 @@ -42,17 +42,24 @@ class Message;
17 * CPPUNIT_SOURCELINE() )
22 +# define NORETURN __attribute__((noreturn))
29 /*! \brief Throws a Exception with the specified message and location.
31 - static void CPPUNIT_API fail( const Message &message,
32 + NORETURN static void CPPUNIT_API fail( const Message &message,
33 const SourceLine &sourceLine = SourceLine() );
35 /*! \brief Throws a Exception with the specified message and location.
36 * \deprecated Use fail( Message, SourceLine ) instead.
38 - static void CPPUNIT_API fail( std::string message,
39 + NORETURN static void CPPUNIT_API fail( std::string message,
40 const SourceLine &sourceLine = SourceLine() );
42 /*! \brief Throws a Exception with the specified message and location.
43 @@ -111,7 +118,7 @@ struct Asserter
44 * what are the differences between the expected and actual value.
45 * \param shortDescription Short description for the failure message.
47 - static void CPPUNIT_API failNotEqual( std::string expected,
48 + NORETURN static void CPPUNIT_API failNotEqual( std::string expected,
50 const SourceLine &sourceLine,
51 const AdditionalMessage &additionalMessage = AdditionalMessage(),