1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-21 18:04:06 +03:00

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>
This commit is contained in:
Björn Jacke 2020-10-19 02:03:02 +02:00 committed by Andrew Bartlett
parent 3c1013caf4
commit aa8d6c779c

View File

@ -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