[winpr,platform] add C23 [[nodiscard]]

This commit is contained in:
Armin Novak
2026-02-24 16:06:54 +01:00
parent 6598081863
commit a9be86ecfa

View File

@@ -76,7 +76,9 @@
#endif
#if defined(WINPR_DEFINE_ATTR_NODISCARD)
#if defined(__clang__)
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201904L)
#define WINPR_ATTR_NODISCARD [[nodiscard]]
#elif defined(__clang__)
#define WINPR_ATTR_NODISCARD __attribute__((warn_unused_result))
#elif defined(__GNUC__) && (__GNUC__ >= 7)
#define WINPR_ATTR_NODISCARD __attribute__((warn_unused_result))