mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
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
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user