From 8bbfe1f5ac4aa3d2333e0fbacb3cbbd2f9f9a5fc Mon Sep 17 00:00:00 2001 From: Alessio Centazzo Date: Sat, 6 Jun 2020 08:07:57 -0700 Subject: [PATCH] Fix warning from issue #507 UnityFail() and UnityIgnore had the noreturn attribute with long jumps disabled --- src/unity_internals.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/unity_internals.h b/src/unity_internals.h index 09b7eda..ffb69a9 100644 --- a/src/unity_internals.h +++ b/src/unity_internals.h @@ -617,8 +617,14 @@ void UnityAssertNumbersArrayWithin(const UNITY_UINT delta, const UNITY_DISPLAY_STYLE_T style, const UNITY_FLAGS_T flags); +#ifndef UNITY_EXCLUDE_SETJMP_H void UnityFail(const char* message, const UNITY_LINE_TYPE line) UNITY_FUNCTION_ATTR(noreturn); void UnityIgnore(const char* message, const UNITY_LINE_TYPE line) UNITY_FUNCTION_ATTR(noreturn); +#else +void UnityFail(const char* message, const UNITY_LINE_TYPE line); +void UnityIgnore(const char* message, const UNITY_LINE_TYPE line); +#endif + void UnityMessage(const char* message, const UNITY_LINE_TYPE line); #ifndef UNITY_EXCLUDE_FLOAT