Wireshark-bugs: [Wireshark-bugs] [Bug 6489] New: -Werror doesn't work with libgcrypt 1.5.0

Date: Wed, 26 Oct 2011 03:20:34 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6489

           Summary: -Werror doesn't work with libgcrypt 1.5.0
           Product: Wireshark
           Version: SVN
          Platform: Other
        OS/Version: FreeBSD
            Status: NEW
          Severity: Major
          Priority: Low
         Component: Wireshark
        AssignedTo: bugzilla-admin@xxxxxxxxxxxxx
        ReportedBy: wireshark@xxxxxxxxxxx


Build Information:
[~/wireshark-globalfilter] edwin@t43>svn info
Path: .
Working Copy Root Path: /usr/home/edwin/wireshark-globalfilter
URL: https://anonsvn.wireshark.org/wireshark/trunk
Repository Root: https://anonsvn.wireshark.org/wireshark
Repository UUID: f5534014-38df-0310-8fa8-9805f1628bb7
Revision: 39586
Node Kind: directory
Schedule: normal
Last Changed Author: gerald
Last Changed Rev: 39582
Last Changed Date: 2011-10-26 09:03:54 +1100 (Wed, 26 Oct 2011)

--
When compiling Wireshark SVN under FreeBSD with libgcrypt 1.5.0, it fails in
epan/dissectors/packet-ssl-utils.h because it has a lot of deprecated functions
warnings in it which are treated as errors:

cc1: warnings being treated as errors
In file included from packet-ieee802154.c:87:
/usr/local/include/gcrypt.h:1336: warning: 'gcry_ac_io_mode_t' is deprecated
/usr/local/include/gcrypt.h:1337: warning: 'gcry_ac_io_type_t' is deprecated
/usr/local/include/gcrypt.h:1344: warning: 'gcry_ac_data_read_cb_t' is
deprecated
etc.

Not fun.

A proper solution for it is to tell gcc to ignore the warning for here:

#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include <gcrypt.h>
#pragma GCC diagnostic error "-Wdeprecated-declarations"

A better way would be to use the pop and push functions, but gcc on FreeBSD
doesn't know about them:

#pragma GCC diagnostic push
#prgram GCC diagnostic ignored "-Wdeprecated-declarations"
#include <gcrypt.h>
#pragma GCC diagnostic pop

This change has to happen in:

ChangeLog
7594:Use <gcrypt.h> instead of 'gcrypt.h'

capinfos.c
87:#include <gcrypt.h>

epan/epan.c
33:#include <gcrypt.h>
^C
[~/wireshark-globalfilter] edwin@t43>ack gcrypt.h *
asn1/pkcs12/packet-pkcs12-template.c
51:#include <gcrypt.h>

asn1/snmp/packet-snmp-template.c
84:#include <gcrypt.h>

capinfos.c
87:#include <gcrypt.h>


epan/dissectors/packet-ipsec.c
95:#include <gcrypt.h>

epan/dissectors/packet-mikey.c
51:#include <gcrypt.h>

epan/dissectors/packet-pkcs12.c
59:#include <gcrypt.h>

epan/dissectors/packet-ssl-utils.h
37:#include <gcrypt.h>

epan/dissectors/packet-ieee802154.c
88:#include <gcrypt.h>

epan/dissectors/packet-snmp.c
92:#include <gcrypt.h>

epan/dissectors/packet-zbee-security.c
44:#include <gcrypt.h>

epan/dissectors/packet-isakmp.c
64:#include <gcrypt.h>

epan/epan.c
33:#include <gcrypt.h>

packaging/u3/tools/sysdep.h
55:#include <gcrypt.h>

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.