Re: [PATCH] reftable: make REFTABLE_UNUSED C99 compatible
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- May 29, 2025, 23:13 UTC
- Message-ID
- <aDjp_IkgmITrl59-@tapette.crustytoothpaste.net>
- In-Reply-To
- <xmqqtt53l7cl.fsf@gitster.g>
On 2025-05-29 at 16:17:14, Junio C Hamano wrote:
Show 15 quoted lines
> Corresponding definition we use in the main part of the project
> defined in compat/posix.h looks like this:
>
> #if GIT_GNUC_PREREQ(4, 5)
> #define UNUSED __attribute__((unused)) \
> __attribute__((deprecated ("parameter declared as UNUSED")))
> #elif defined(__GNUC__)
> #define UNUSED __attribute__((unused)) \
> __attribute__((deprecated))
> #else
> #define UNUSED
> #endif
>
> GCC 4.5 or older may no longer be relevant, in which case yours may
> be good enough.RHEL 7, which is now well past EOL, had GCC 4.8 and Debian 7, released in 2013 and also well past EOL, had GCC 4.7. I think we can safely assume nobody within our support policy is using GCC before 4.5.
-- brian m. carlson (they/them) Toronto, Ontario, CA