From b82c55af78738258b56bd8fe7b5f8d5ccf85f832 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Sun, 16 Jul 2017 14:56:43 +0200 Subject: Add attribute [[noreturn]] (C++11) to functions that will not return Rationale: * Reduce the number of false positives from static analyzers * Potentially enable additional compiler optimizations --- src/test/test_bitcoin_main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test') diff --git a/src/test/test_bitcoin_main.cpp b/src/test/test_bitcoin_main.cpp index 34beef5539..b556c953b9 100644 --- a/src/test/test_bitcoin_main.cpp +++ b/src/test/test_bitcoin_main.cpp @@ -10,14 +10,14 @@ std::unique_ptr g_connman; -void Shutdown(void* parg) +[[noreturn]] void Shutdown(void* parg) { - exit(EXIT_SUCCESS); + std::exit(EXIT_SUCCESS); } -void StartShutdown() +[[noreturn]] void StartShutdown() { - exit(EXIT_SUCCESS); + std::exit(EXIT_SUCCESS); } bool ShutdownRequested() -- cgit v1.2.3