mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
[winpr,platform] fall back to attribute for GCC
GCC does not like [[nodiscard]] on function pointers. Fall back to attribute(warn_unused_result) syntax, which does seem to work.
This commit is contained in:
@@ -95,6 +95,14 @@
|
||||
#define WINPR_ATTR_NODISCARD
|
||||
#endif
|
||||
|
||||
/* GCC does not like [[nodiscard]] on function pointers.
|
||||
* it does not complain when using attribute syntax thoug...
|
||||
*/
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#undef WINPR_ATTR_NODISCARD
|
||||
#define WINPR_ATTR_NODISCARD __attribute__((warn_unused_result))
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
#define WINPR_PRAGMA_DIAG_PUSH WINPR_DO_PRAGMA(clang diagnostic push)
|
||||
#define WINPR_PRAGMA_DIAG_IGNORED_OVERLENGTH_STRINGS \
|
||||
|
||||
Reference in New Issue
Block a user