From 48fe4ce104df060dd5d2b4188a56eb554d94d819 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Fri, 15 Feb 2019 08:06:36 +0100 Subject: Mark generated functions unused (applies to safestack, lhash, sparse_array) safestack.h, lhash.h and sparse_array.h all define macros to generate a full API for the containers as static inline functions. This potentially generates unused code, which some compilers may complain about. We therefore need to mark those generated functions as unused, so the compiler knows that we know, and stops complaining about it. Reviewed-by: Nicola Tuveri (Merged from https://github.com/openssl/openssl/pull/8246) --- include/openssl/e_os2.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/openssl/e_os2.h') diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h index 002cea3b7f..b88abc1791 100644 --- a/include/openssl/e_os2.h +++ b/include/openssl/e_os2.h @@ -287,6 +287,13 @@ typedef unsigned __int64 uint64_t; # define ossl_noreturn # endif +/* ossl_unused: portable unused attribute for use in public headers */ +# if defined(__GNUC__) +# define ossl_unused __attribute__((unused)) +# else +# define ossl_unused +# endif + #ifdef __cplusplus } #endif -- cgit v1.2.1