Merge pull request #5 from lioncash/noreturn

logvisor: Mark logvisorAbort as [[noreturn]]
This commit is contained in:
Phillip Stephens 2019-09-06 23:26:44 -07:00 committed by GitHub
commit 8c2e711362
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ extern "C" void logvisorBp();
namespace logvisor { namespace logvisor {
void logvisorAbort(); [[noreturn]] void logvisorAbort();
#if _WIN32 && UNICODE #if _WIN32 && UNICODE
#define LOG_UCS2 1 #define LOG_UCS2 1

View File

@ -116,7 +116,7 @@ void KillProcessTree() {
} }
} }
void logvisorAbort() { [[noreturn]] void logvisorAbort() {
#if !WINDOWS_STORE #if !WINDOWS_STORE
unsigned int i; unsigned int i;
void* stack[100]; void* stack[100];
@ -167,13 +167,13 @@ void logvisorAbort() {
} }
#elif defined(__SWITCH__) #elif defined(__SWITCH__)
void logvisorAbort() { exit(1); } [[noreturn]] void logvisorAbort() { exit(1); }
#else #else
void KillProcessTree() {} void KillProcessTree() {}
#include <execinfo.h> #include <execinfo.h>
void logvisorAbort() { [[noreturn]] void logvisorAbort() {
void* array[128]; void* array[128];
size_t size = backtrace(array, 128); size_t size = backtrace(array, 128);