Problem with warning: gcrypt.h '...' is deprecated messages
steve at stephen-fisher.com
Wed Jul 13 18:29:56 CEST 2011
Since upgrading to libgcrypt 1.5.0 recently, I'm having problems with
messages such as these...
/usr/local/include/gcrypt.h:1643: warning: 'gcry_ac_io_t' is deprecated
/usr/local/include/gcrypt.h:1649: warning: 'gcry_ac_id_t' is deprecated
/usr/local/include/gcrypt.h:1656: warning: 'gcry_ac_id_t' is deprecated
The release announcement for 1.5.0 says that using gcry_ac_ functions
will produce compile time warnings. We are not using those functions,
so the mere inclusion of the gcrypt.h header file is causing these
warnings because they are marked with the "_GCRY_ATTR_INTERNAL" macro,
which becomes the gcc deprecated attribute.
I found this problem with a project I'm a developer for called
Wireshark. We compile with -Werror in development versions, so these
warnings stop the compilation. Compiling a simple hello world program
with gcrypt.h included has the same problem. Defining "
_GCRYPT_IN_LIBGCRYPT" to "1" in Wireshark sources before the gcrypt.h
inclusion works around this problem in my local sources.
More information about the Gcrypt-devel