[Wireshark-dev] libgcrypt 1.5.0 compiler warnings
Dear all, this issue has been around for a long time. When we use libgcrypt 1.5.0, including gcrypt.h spills out lots of warnings about deprecated definitions, breaking compilation with -Werror. Steven Fisher asked about this on the libgcrypt list http://old.nabble.com/Re%3A-Problem-with-warning%3A-gcrypt.h-%27...%27-is-deprecated-messages-p32398900.html It was said that it's a gcc specific problem. I was wondering if we could use gcc pragmas to address this. How about replacing #include gcrypt.h with #pragma GCC diagnostic push #pragma GCC diagnostic warning -Wdeprecated-declarations #include gcrypt.h #pragma GCC diagnostic pop This should be enough as we don't seem to use any of the deprecated functionality. It's relatively few places where gcrypt.h is included. If that's too error-prone as people may include gcrypt.h elsewhere in the future and forget to add the pragmas, we could have a wrapper include file (epan/crypt/ws-libgcrypt.h ?) with the 4 lines above and include that instead of gcrypt.h. Thoughts? Best regards, Martin ___ Sent via:Wireshark-dev mailing list wireshark-dev@wireshark.org Archives:http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
Re: [Wireshark-dev] libgcrypt 1.5.0 compiler warnings
2013/2/21 Martin Kaiser li...@kaiser.cx Dear all, this issue has been around for a long time. When we use libgcrypt 1.5.0, including gcrypt.h spills out lots of warnings about deprecated definitions, breaking compilation with -Werror. Steven Fisher asked about this on the libgcrypt list http://old.nabble.com/Re%3A-Problem-with-warning%3A-gcrypt.h-%27...%27-is-deprecated-messages-p32398900.html It was said that it's a gcc specific problem. I was wondering if we could use gcc pragmas to address this. How about replacing #include gcrypt.h with #pragma GCC diagnostic push #pragma GCC diagnostic warning -Wdeprecated-declarations #include gcrypt.h #pragma GCC diagnostic pop This should be enough as we don't seem to use any of the deprecated functionality. It's relatively few places where gcrypt.h is included. If that's too error-prone as people may include gcrypt.h elsewhere in the future and forget to add the pragmas, we could have a wrapper include file (epan/crypt/ws-libgcrypt.h ?) with the 4 lines above and include that instead of gcrypt.h. Thoughts? Hi Martin, bug 6489 (filled by Edwin Groothuis) contains a patch quite similar to yours. Personally I like the wrapper idea. Regards, Pascal. ___ Sent via:Wireshark-dev mailing list wireshark-dev@wireshark.org Archives:http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
Re: [Wireshark-dev] libgcrypt 1.5.0 compiler warnings
On 2/21/13 12:47 AM, Martin Kaiser wrote: If that's too error-prone as people may include gcrypt.h elsewhere in the future and forget to add the pragmas, we could have a wrapper include file (epan/crypt/ws-libgcrypt.h ?) with the 4 lines above and include that instead of gcrypt.h. Sounds good to me. I've been working around the issue with CFLAGS=-D_GCRYPT_IN_LIBGCRYPT=1 but it would be nice if we could compile out of the box. ___ Sent via:Wireshark-dev mailing list wireshark-dev@wireshark.org Archives:http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
Re: [Wireshark-dev] libgcrypt 1.5.0 compiler warnings
Hi, Thus wrote Gerald Combs (ger...@wireshark.org): On 2/21/13 12:47 AM, Martin Kaiser wrote: If that's too error-prone as people may include gcrypt.h elsewhere in the future and forget to add the pragmas, we could have a wrapper include file (epan/crypt/ws-libgcrypt.h ?) with the 4 lines above and include that instead of gcrypt.h. Sounds good to me. I've been working around the issue with CFLAGS=-D_GCRYPT_IN_LIBGCRYPT=1 but it would be nice if we could compile out of the box. I just comitted a slightly modified version of this in r47801-47803 It turned out that not all gcc versions support the pragmas we need. Please let me know if I broke anything. Best regards, Martin ___ Sent via:Wireshark-dev mailing list wireshark-dev@wireshark.org Archives:http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe