Wireshark mailing list archives
Re: #ifdef mess
From: João Valverde <joao.valverde () tecnico ulisboa pt>
Date: Tue, 29 Mar 2016 15:34:38 +0100
On 28-03-2016 23:30, Joerg Mayer wrote:
Hello list, I've been meaning to write this mail for some years now but finally got around to it. Earlier today I committed 30900b443b85a7e760d703ca3d6efe61df4fe623, which I'm incredibly unproud of because of readablity: static void -get_reordercap_runtime_info(GString *str _U_) +get_reordercap_runtime_info( +#if defined(HAVE_LIBZ) && !defined(_WIN32) + GString *str) +#else + GString *str _U_) +#endif { It fixes the error at hand, but that is about all the good I can say about it.
It's only an error because -Werror=used-but-marked-unused was enabled. Since the semantics of _U_ are *possibly* unused variable, neither the warning nor the #ifdef should exist IMO.
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- #ifdef mess Joerg Mayer (Mar 28)
- Re: #ifdef mess Guy Harris (Mar 28)
- Re: #ifdef mess Dario Lombardo (Mar 29)
- Re: #ifdef mess Alexis La Goutte (Mar 31)
- Re: #ifdef mess Guy Harris (Mar 31)
- Re: #ifdef mess João Valverde (Mar 29)
- Re: #ifdef mess Joerg Mayer (Mar 29)
- Re: #ifdef mess João Valverde (Mar 29)
- Re: #ifdef mess Joerg Mayer (Mar 29)
- Re: #ifdef mess Guy Harris (Mar 28)