diff options
author | Gary Lockyer <gary@catalyst.net.nz> | 2020-05-01 15:03:10 +1200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2020-05-08 09:31:31 +0000 |
commit | c2b0071460c09eb24d12880e54e2f80c77834ebb (patch) | |
tree | c3235ba9a5d7e5281652f3f61999be5f51af1c73 /pidl/lib/Parse/Pidl | |
parent | d55812e4eee41fa913a9d102a54ee4d7f85fc2bc (diff) | |
download | samba-c2b0071460c09eb24d12880e54e2f80c77834ebb.tar.gz |
Fix clang 9 unused-function warnings
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'pidl/lib/Parse/Pidl')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/Python.pm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 12ddd046062..e72d32db391 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -2295,6 +2295,17 @@ sub Parse($$$$$) $ndr_hdr_include /* + * Suppress compiler warnings if the generated code does not call these + * functions + */ +#ifndef _MAYBE_UNUSED_ +#ifdef HAVE___ATTRIBUTE__ +#define _MAYBE_UNUSED_ __attribute__ ((unused)) +#else +#define _MAYBE_UNUSED_ +#endif +#endif +/* * These functions are here to ensure they can be optimized out by * the compiler based on the constant input values */ @@ -2315,7 +2326,7 @@ static inline unsigned long long ndr_sizeof2uintmax(size_t var_size) return 0; } -static inline long long ndr_sizeof2intmax(size_t var_size) +static inline _MAYBE_UNUSED_ long long ndr_sizeof2intmax(size_t var_size) { switch (var_size) { case 8: |