Skip to content

Commit

Permalink
Merge pull request managarm#938 from Dennisbonke/assert
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennisbonke authored Oct 28, 2023
2 parents 332306a + bfb21b1 commit e54b2e8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion options/ansi/generic/assert-stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <bits/ensure.h>

void __assert_fail(const char *assertion, const char *file, unsigned int line,
[[noreturn]] void __assert_fail(const char *assertion, const char *file, unsigned int line,
const char *function) {
fprintf(stderr, "In function %s, file %s:%d: Assertion '%s' failed!\n",
function, file, line, assertion);
Expand Down
2 changes: 1 addition & 1 deletion options/ansi/include/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ extern "C" {
#ifndef __MLIBC_ABI_ONLY

// NOTE: This is not ISO C. Declared in LSB
void __assert_fail(const char *assertion, const char *file, unsigned int line,
__attribute__ ((__noreturn__)) void __assert_fail(const char *assertion, const char *file, unsigned int line,
const char *function);

#endif /* !__MLIBC_ABI_ONLY */
Expand Down
2 changes: 1 addition & 1 deletion options/glibc/generic/glibc-assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <bits/ensure.h>

void __assert_fail_perror(int errno, const char *file, unsigned int line,
[[noreturn]] void __assert_fail_perror(int errno, const char *file, unsigned int line,
const char *function) {
char *errormsg = strerror(errno);
fprintf(stderr, "In function %s, file %s:%d: Errno '%s' failed!\n",
Expand Down
2 changes: 1 addition & 1 deletion options/glibc/include/bits/glibc/glibc_assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ extern "C" {

#ifndef __MLIBC_ABI_ONLY

void __assert_fail_perror(int errno, const char *file, unsigned int line,
__attribute__ ((__noreturn__)) void __assert_fail_perror(int errno, const char *file, unsigned int line,
const char *function);

#endif /* !__MLIBC_ABI_ONLY */
Expand Down

0 comments on commit e54b2e8

Please sign in to comment.