From: Björn Jacke Date: Mon, 19 Oct 2020 00:03:02 +0000 (+0200) Subject: pidl: use unused attribute only if supported by feature macro X-Git-Tag: talloc-2.3.2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa8d6c779ca89d6be1c8b973d3ea60e6073bf899;p=thirdparty%2Fsamba.git pidl: use unused attribute only if supported by feature macro Signed-off-by: Bjoern Jacke Reviewed-by: Andrew Bartlett --- 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