Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
745105a4
Kaydet (Commit)
745105a4
authored
Tem 06, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
try and help scan-build out wrt cppunit asserts
Change-Id: Id86607802415ad069aa88be98012a5c99f594218
üst
55aa83da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
0 deletions
+55
-0
0001-mark-the-fails-as-no-return.patch.1
external/cppunit/0001-mark-the-fails-as-no-return.patch.1
+54
-0
UnpackedTarball_cppunit.mk
external/cppunit/UnpackedTarball_cppunit.mk
+1
-0
No files found.
external/cppunit/0001-mark-the-fails-as-no-return.patch.1
0 → 100644
Dosyayı görüntüle @
745105a4
From 059fcd2878071616cedb5116a0b2f75b5edbdbe0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Sun, 6 Jul 2014 15:34:41 +0100
Subject: [PATCH] mark the fails as no-return
that might help clang scan-build understand that execution won't continue after
they fail
---
include/cppunit/Asserter.h | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/include/cppunit/Asserter.h b/include/cppunit/Asserter.h
index 94dadaa..ad981b5 100644
--- a/include/cppunit/Asserter.h
+++ b/include/cppunit/Asserter.h
@@ -42,17 +42,24 @@ class Message;
* CPPUNIT_SOURCELINE() )
* \endcode
*/
+
+#if defined __GNUC__
+# define NORETURN __attribute__((noreturn))
+#else
+# define NORETURN
+#endif
+
struct Asserter
{
/*! \brief Throws a Exception with the specified message and location.
*/
- static void CPPUNIT_API fail( const Message &message,
+ NORETURN static void CPPUNIT_API fail( const Message &message,
const SourceLine &sourceLine = SourceLine() );
/*! \brief Throws a Exception with the specified message and location.
* \deprecated Use fail( Message, SourceLine ) instead.
*/
- static void CPPUNIT_API fail( std::string message,
+ NORETURN static void CPPUNIT_API fail( std::string message,
const SourceLine &sourceLine = SourceLine() );
/*! \brief Throws a Exception with the specified message and location.
@@ -111,7 +118,7 @@ struct Asserter
* what are the differences between the expected and actual value.
* \param shortDescription Short description for the failure message.
*/
- static void CPPUNIT_API failNotEqual( std::string expected,
+ NORETURN static void CPPUNIT_API failNotEqual( std::string expected,
std::string actual,
const SourceLine &sourceLine,
const AdditionalMessage &additionalMessage = AdditionalMessage(),
--
1.9.3
external/cppunit/UnpackedTarball_cppunit.mk
Dosyayı görüntüle @
745105a4
...
...
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
external/cppunit/wundef.patch \
external/cppunit/CPPUNIT_PLUGIN_EXPORT.patch.0 \
external/cppunit/enable-win32-debug.patch \
external/cppunit/0001-mark-the-fails-as-no-return.patch.1 \
))
ifeq ($(DISABLE_DYNLOADING),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment