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:
practicalswift
2017-07-16 14:56:43 +02:00
parent 5cfdda2503
commit b82c55af78
2 changed files with 6 additions and 6 deletions

View File

@@ -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()