mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-08-20 10:09:55 +00:00
Merge pull request #503 from andred/master
unity: annotate noreturn APIs (fix Wsuggest-attribute=noreturn warnings)
This commit is contained in:
@@ -40,6 +40,12 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined __GNUC__
|
||||||
|
# define UNITY_FUNCTION_ATTR(a) __attribute__((a))
|
||||||
|
#else
|
||||||
|
# define UNITY_FUNCTION_ATTR(a) /* ignore */
|
||||||
|
#endif
|
||||||
|
|
||||||
/*-------------------------------------------------------
|
/*-------------------------------------------------------
|
||||||
* Guess Widths If Not Specified
|
* Guess Widths If Not Specified
|
||||||
*-------------------------------------------------------*/
|
*-------------------------------------------------------*/
|
||||||
@@ -611,8 +617,8 @@ void UnityAssertNumbersArrayWithin(const UNITY_UINT delta,
|
|||||||
const UNITY_DISPLAY_STYLE_T style,
|
const UNITY_DISPLAY_STYLE_T style,
|
||||||
const UNITY_FLAGS_T flags);
|
const UNITY_FLAGS_T flags);
|
||||||
|
|
||||||
void UnityFail(const char* message, const UNITY_LINE_TYPE line);
|
void UnityFail(const char* message, const UNITY_LINE_TYPE line) UNITY_FUNCTION_ATTR(noreturn);
|
||||||
void UnityIgnore(const char* message, const UNITY_LINE_TYPE line);
|
void UnityIgnore(const char* message, const UNITY_LINE_TYPE line) UNITY_FUNCTION_ATTR(noreturn);
|
||||||
void UnityMessage(const char* message, const UNITY_LINE_TYPE line);
|
void UnityMessage(const char* message, const UNITY_LINE_TYPE line);
|
||||||
|
|
||||||
#ifndef UNITY_EXCLUDE_FLOAT
|
#ifndef UNITY_EXCLUDE_FLOAT
|
||||||
|
|||||||
Reference in New Issue
Block a user