diff options
author | Björn Jacke <bj@sernet.de> | 2020-10-19 02:03:02 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2020-11-10 06:53:43 +0000 |
commit | aa8d6c779ca89d6be1c8b973d3ea60e6073bf899 (patch) | |
tree | 82dd44c58e37d09b97eefa3d075e6c186ec89af7 | |
parent | 3c1013caf4b57c6af5a5d210df232c08a1227a17 (diff) | |
download | samba-aa8d6c779ca89d6be1c8b973d3ea60e6073bf899.tar.gz |
pidl: use unused attribute only if supported by feature macro
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/Python.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 76a094b625b..578e17d1cbc 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -2304,12 +2304,14 @@ $ndr_hdr_include * functions */ #ifndef _MAYBE_UNUSED_ -#ifdef HAVE___ATTRIBUTE__ +#ifdef __has_attribute +#if __has_attribute(unused) #define _MAYBE_UNUSED_ __attribute__ ((unused)) #else #define _MAYBE_UNUSED_ #endif #endif +#endif /* * These functions are here to ensure they can be optimized out by * the compiler based on the constant input values |