mirror of https://github.com/AxioDL/logvisor.git
logvisor: Mark logvisorAbort as [[noreturn]]
All variants of logvisorAbort do what they say in their name -- abort. Given control isn't returned from this function, we can signify that it's a noreturn function
This commit is contained in:
parent
f623ace3b4
commit
63cb911d09
|
@ -21,7 +21,7 @@ extern "C" void logvisorBp();
|
|||
|
||||
namespace logvisor {
|
||||
|
||||
void logvisorAbort();
|
||||
[[noreturn]] void logvisorAbort();
|
||||
|
||||
#if _WIN32 && UNICODE
|
||||
#define LOG_UCS2 1
|
||||
|
|
|
@ -116,7 +116,7 @@ void KillProcessTree() {
|
|||
}
|
||||
}
|
||||
|
||||
void logvisorAbort() {
|
||||
[[noreturn]] void logvisorAbort() {
|
||||
#if !WINDOWS_STORE
|
||||
unsigned int i;
|
||||
void* stack[100];
|
||||
|
@ -167,13 +167,13 @@ void logvisorAbort() {
|
|||
}
|
||||
|
||||
#elif defined(__SWITCH__)
|
||||
void logvisorAbort() { exit(1); }
|
||||
[[noreturn]] void logvisorAbort() { exit(1); }
|
||||
#else
|
||||
|
||||
void KillProcessTree() {}
|
||||
|
||||
#include <execinfo.h>
|
||||
void logvisorAbort() {
|
||||
[[noreturn]] void logvisorAbort() {
|
||||
void* array[128];
|
||||
size_t size = backtrace(array, 128);
|
||||
|
||||
|
|
Loading…
Reference in New Issue