fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / cppunit / 0001-mark-the-fails-as-no-return.patch.1
blob13961f9e3506312d172f240799bae6a3f8fa7c2f
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
7 they fail
8 ---
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() )
18   * \endcode
19   */
21 +#if defined __GNUC__
22 +#   define NORETURN __attribute__((noreturn))
23 +#else
24 +#   define NORETURN
25 +#endif
27  struct Asserter
28  {
29    /*! \brief Throws a Exception with the specified message and location.
30     */
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.
37     */
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.
46     */
47 -  static void CPPUNIT_API failNotEqual( std::string expected, 
48 +  NORETURN static void CPPUNIT_API failNotEqual( std::string expected, 
49                                          std::string actual, 
50                                          const SourceLine &sourceLine,
51                                          const AdditionalMessage &additionalMessage = AdditionalMessage(),
52 -- 
53 1.9.3