]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Avoid deprecation warnings when including gnutls/abstract.h
authorMartin Storsjo <martin@martin.st>
Fri, 17 Mar 2017 21:33:01 +0000 (23:33 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 18 Mar 2017 16:37:47 +0000 (17:37 +0100)
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 <martin@martin.st>
lib/includes/gnutls/openpgp.h

index 69a6e19e6846dab6c889a14e7d195b5c37560e4a..69176c7814057bca029c68fb646f20d2d2810ea1 100644 (file)
@@ -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,