Skip to content

Commit

Permalink
Add noreturn attribute to panic
Browse files Browse the repository at this point in the history
(cherry picked from commit 432bc18)
  • Loading branch information
acgaudette committed Jul 5, 2021
1 parent 7cf0923 commit a655d5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
#include <stdlib.h>
#include <stdio.h>

__attribute__((noreturn))
static void panic()
{
printf("Exit failure\n");
fflush(stdout);
abort();
}

__attribute__((noreturn))
static void panic_msg(const char *msg)
{
fflush(stdout);
Expand Down

0 comments on commit a655d5f

Please sign in to comment.