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/random.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/random.cpp') diff --git a/src/random.cpp b/src/random.cpp index 67efc7d94..b0044af51 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -39,10 +39,10 @@ #include #include -static void RandFailure() +[[noreturn]] static void RandFailure() { LogPrintf("Failed to read randomness, aborting\n"); - abort(); + std::abort(); } static inline int64_t GetPerformanceCounter() -- cgit v1.2.3