diff options
-rw-r--r-- | common/scummsys.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/scummsys.h b/common/scummsys.h index 5486ba27c6..ce54f3b50e 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -398,6 +398,18 @@ #endif #endif +#ifndef WARN_UNUSED_RESULT + #if __cplusplus >= 201703L + #define WARN_UNUSED_RESULT [[nodiscard]] + #elif GCC_ATLEAST(3, 4) + #define WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) + #elif defined(_Check_return_) + #define WARN_UNUSED_RESULT _Check_return_ + #else + #define WARN_UNUSED_RESULT + #endif +#endif + #ifndef STRINGBUFLEN #if defined(__N64__) || defined(__DS__) || defined(__3DS__) #define STRINGBUFLEN 256 |