mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 18:46:18 +00:00
xrt: Add XRT_CHECK_RESULT define
This commit is contained in:
parent
2bb0c5cda5
commit
57d1394941
|
@ -64,6 +64,18 @@
|
|||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* To make sure return values are checked.
|
||||
*/
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
#define XRT_CHECK_RESULT __attribute__((warn_unused_result))
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1700)
|
||||
#define XRT_CHECK_RESULT _Check_return_
|
||||
#else
|
||||
#define XRT_CHECK_RESULT
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* To stop inlining.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue