Commit 557f1375 authored by Muhammad Usama Anjum's avatar Muhammad Usama Anjum Committed by Shuah Khan

selftests: Mark ksft_exit_fail_perror() as __noreturn

Let the compilers (clang) know that this function would just call
exit() and would never return. It is needed to avoid false positive
static analysis errors. All similar functions calling exit()
unconditionally have been marked as __noreturn.
Signed-off-by: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 6a569511
......@@ -377,7 +377,7 @@ static inline __noreturn __printf(1, 2) int ksft_exit_fail_msg(const char *msg,
exit(KSFT_FAIL);
}
static inline void ksft_exit_fail_perror(const char *msg)
static inline __noreturn void ksft_exit_fail_perror(const char *msg)
{
#ifndef NOLIBC
ksft_exit_fail_msg("%s: %s (%d)\n", msg, strerror(errno), errno);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment