Skip to content

Commit

Permalink
issue Xilinx-CNS#190: add missed noreturn attribute
Browse files Browse the repository at this point in the history
Mark __ci_sys_fail() as noreturn to stop objtool generating
"__ci_sys_fail() is missing a __noreturn annotation" warning.

Signed-off-by: Sergey Nikitin <[email protected]>
  • Loading branch information
okt-sergeyn committed Dec 1, 2023
1 parent af6a8b9 commit 9f936e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/include/ci/tools/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ __ci_fail(const char* fmt, ...) CI_PRINTF_LIKE(1,2) CI_HF;
#define ci_fail(x) \
do{ ci_log("FAIL at %s:%d", __FILE__, __LINE__); __ci_fail x; }while(0)

extern void __ci_sys_fail(const char* fn, int rc,
extern CI_NORETURN __ci_sys_fail(const char* fn, int rc,
const char* file, int line) CI_HF;
#define ci_sys_fail(fn, rc) __ci_sys_fail(fn, rc, __FILE__, __LINE__)

Expand Down
2 changes: 1 addition & 1 deletion src/lib/citools/sys_fail.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "citools_internal.h"


void __ci_sys_fail(const char* fn, int rc, const char* file, int line)
CI_NORETURN __ci_sys_fail(const char* fn, int rc, const char* file, int line)
{
ci_log("*** UNEXPECTED ERROR ***");
ci_log(" what: %s", fn);
Expand Down

0 comments on commit 9f936e4

Please sign in to comment.