diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-01 16:25:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-01 16:28:55 +0300 |
commit | 07b53a06e9cde268d423917193f1f3d7cebcdbeb (patch) | |
tree | a6912effc61c48a42e1f999dc3b08fc2280669c7 /src/localconsts.h | |
parent | 2d64e42449c580b7e4135559113725a255022a9a (diff) | |
download | manaverse-07b53a06e9cde268d423917193f1f3d7cebcdbeb.tar.gz manaverse-07b53a06e9cde268d423917193f1f3d7cebcdbeb.tar.bz2 manaverse-07b53a06e9cde268d423917193f1f3d7cebcdbeb.tar.xz manaverse-07b53a06e9cde268d423917193f1f3d7cebcdbeb.zip |
Add macro A_WARN_UNUSED_NON_TESTS what works only not in unit tests.
Diffstat (limited to 'src/localconsts.h')
-rw-r--r-- | src/localconsts.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/localconsts.h b/src/localconsts.h index 5b53d364c..0f554a677 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -94,6 +94,11 @@ #ifdef __GNUC__ #define A_UNUSED __attribute__ ((unused)) #define A_WARN_UNUSED __attribute__ ((warn_unused_result)) +#ifdef UNITTESTS +#define A_WARN_UNUSED_NON_TESTS +#else // UNITTESTS +#define A_WARN_UNUSED_NON_TESTS __attribute__ ((warn_unused_result)) +#endif // UNITTESTS #define DEPRECATED __attribute__ ((deprecated)) #ifdef DYECMD #define A_DYECMD_UNUSED __attribute__ ((unused)) @@ -165,6 +170,7 @@ #else // __GNUC__ #define A_UNUSED #define A_WARN_UNUSED +#define A_WARN_UNUSED_NON_TESTS #define gnu_printf printf #define DEPRECATED #define restrict |