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/random.cpp | |
parent | 5cfdda2503c995cdd563b1a2a29162ac298d173d (diff) |
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/random.cpp')
-rw-r--r-- | src/random.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/random.cpp b/src/random.cpp index 67efc7d945..b0044af514 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -39,10 +39,10 @@ #include <openssl/err.h> #include <openssl/rand.h> -static void RandFailure() +[[noreturn]] static void RandFailure() { LogPrintf("Failed to read randomness, aborting\n"); - abort(); + std::abort(); } static inline int64_t GetPerformanceCounter() |