From: Ondřej Surý Date: Fri, 17 Mar 2023 15:44:10 +0000 (+0100) Subject: Fix: use __noreturn__ for C11-compatibility X-Git-Tag: v0.13.4~24 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7c0c9f488c7b72e5e2bf73404f1f036da19f2414;p=urcu.git Fix: use __noreturn__ for C11-compatibility The noreturn convenience macro provided by stdnoreturn.h might get included before urcu headers, use __noreturn__ for better compatibility with code using header. Signed-off-by: Ondřej Surý Signed-off-by: Mathieu Desnoyers --- diff --git a/include/urcu/uatomic/generic.h b/include/urcu/uatomic/generic.h index 89d1cfa..c3762b0 100644 --- a/include/urcu/uatomic/generic.h +++ b/include/urcu/uatomic/generic.h @@ -38,7 +38,7 @@ extern "C" { #endif #if !defined __OPTIMIZE__ || defined UATOMIC_NO_LINK_ERROR -static inline __attribute__((always_inline, noreturn)) +static inline __attribute__((always_inline, __noreturn__)) void _uatomic_link_error(void) { #ifdef ILLEGAL_INSTR diff --git a/src/urcu-call-rcu-impl.h b/src/urcu-call-rcu-impl.h index 187727e..cc76f53 100644 --- a/src/urcu-call-rcu-impl.h +++ b/src/urcu-call-rcu-impl.h @@ -1055,7 +1055,7 @@ void urcu_register_rculfhash_atfork(struct urcu_atfork *atfork) * This unregistration function is deprecated, meant only for internal * use by rculfhash. */ -__attribute__((noreturn)) +__attribute__((__noreturn__)) void urcu_unregister_rculfhash_atfork(struct urcu_atfork *atfork __attribute__((unused))) { urcu_die(EPERM); diff --git a/tests/regression/rcutorture.h b/tests/regression/rcutorture.h index ac5348c..c4455a0 100644 --- a/tests/regression/rcutorture.h +++ b/tests/regression/rcutorture.h @@ -532,7 +532,7 @@ int stresstest(int nreaders) */ static -void usage(char *argv[]) __attribute__((noreturn)); +void usage(char *argv[]) __attribute__((__noreturn__)); static void usage(char *argv[]) diff --git a/tests/utils/tap.h b/tests/utils/tap.h index 39312fc..b64a470 100644 --- a/tests/utils/tap.h +++ b/tests/utils/tap.h @@ -64,7 +64,7 @@ __attribute__((format(TAP_PRINTF_FORMAT, 5, 6))) unsigned int _gen_result(int, const char *, const char *, unsigned int, const char *, ...); int plan_no_plan(void); -__attribute__((noreturn)) +__attribute__((__noreturn__)) int plan_skip_all(const char *); int plan_tests(unsigned int);