diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2017-07-16 14:56:43 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2017-07-17 18:46:18 +0200 |
commit | b82c55af78738258b56bd8fe7b5f8d5ccf85f832 (patch) | |
tree | d2d0e2d5c533bd9ff6a6ddf4ef5cce5ff8b9161c /src/test/test_bitcoin_main.cpp | |
parent | 5cfdda2503c995cdd563b1a2a29162ac298d173d (diff) | |
download | bitcoin-b82c55af78738258b56bd8fe7b5f8d5ccf85f832.tar.xz |
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
Diffstat (limited to 'src/test/test_bitcoin_main.cpp')
-rw-r--r-- | src/test/test_bitcoin_main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<CConnman> 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() |