From: Martin Storsjo Date: Fri, 17 Mar 2017 21:33:01 +0000 (+0200) Subject: Avoid deprecation warnings when including gnutls/abstract.h X-Git-Tag: gnutls_3_6_0~778 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2089dbcaa3401903c6df464146f5b7557571efb;p=thirdparty%2Fgnutls.git Avoid deprecation warnings when including gnutls/abstract.h Since ac3de8f5, when all openpgp functionality was deprecated, a library user including gnutls/abstract.h gets warnings about deprecated declarations, like this: gnutls/openpgp.h:328:10: warning: ‘gnutls_openpgp_recv_key_func’ is deprecated [-Wdeprecated-declarations] gnutls_openpgp_recv_key_func func) _GNUTLS_GCC_ATTR_DEPRECATED; This warning is emitted since the gnutls_openpgp_set_recv_key_function prototype uses the deprecated typedef gnutls_openpgp_recv_key_func. By omitting the deprecation attribute from this individual typedef, we avoid the spurious warnings in calling code which just includes gnutls/abstract.h without actually using anything related to openpgp. Signed-off-by: Martin Storsjo --- diff --git a/lib/includes/gnutls/openpgp.h b/lib/includes/gnutls/openpgp.h index 69a6e19e68..69176c7814 100644 --- a/lib/includes/gnutls/openpgp.h +++ b/lib/includes/gnutls/openpgp.h @@ -320,7 +320,7 @@ typedef int (*gnutls_openpgp_recv_key_func) (gnutls_session_t *keyfpr, unsigned int keyfpr_length, - gnutls_datum_t * key) _GNUTLS_GCC_ATTR_DEPRECATED; + gnutls_datum_t * key); void gnutls_openpgp_set_recv_key_function(gnutls_session_t session,