Skip to content

Commit 4428cb2

Browse files
committed
Core: Add MSVC and GCC version checks for LV_NODISCARD.
1 parent 8096ffe commit 4428cb2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libvisual/libvisual/lv_defines.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@
122122

123123
#ifdef __cplusplus
124124
#define LV_NODISCARD [[nodiscard]]
125-
#elif defined(_MSC_VER)
125+
#elif defined(_MSC_VER) && _MSC_VER >= 1700
126126
#define LV_NODISCARD _Check_return_
127-
#elif defined(__GNUC__)
127+
#elif defined(__GNUC__) && __GNUC__ >= 4
128128
#define LV_NODISCARD __attribute__ ((warn_unused_result))
129129
#else
130130
#define LV_NODISCARD

0 commit comments

Comments
 (0)