Skip to content

Commit

Permalink
COMMON: Add WARN_UNUSED_RESULT to scummsys.h
Browse files Browse the repository at this point in the history
  • Loading branch information
bonki committed Apr 4, 2018
1 parent 4c5afcf commit a0d7a99
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions common/scummsys.h
Expand Up @@ -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
Expand Down

0 comments on commit a0d7a99

Please sign in to comment.