Add noreturn attribute to fix compiler warnings

reverse-scroll
nirenjan 2021-07-15 17:57:51 -07:00
parent 738879f79f
commit fc9bebbe5a
2 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,7 @@ AX_COMPILER_FLAGS
AC_CANONICAL_HOST
AX_GCC_FUNC_ATTRIBUTE([constructor])
AX_GCC_FUNC_ATTRIBUTE([format])
AX_GCC_FUNC_ATTRIBUTE([noreturn])
AC_MSG_NOTICE([Detected host OS is ${host_os}])
build_linux=no

View File

@ -34,6 +34,9 @@ static void set_log_file(bool foreground, const char *log_file)
}
}
#if HAVE_FUNC_ATTRIBUTE_NORETURN
__attribute__((noreturn))
#endif
static void usage(int exit_code)
{
fprintf(stderr,