Thread (5 messages) 5 messages, 4 authors, 2025-05-30

Re: [PATCH] reftable: make REFTABLE_UNUSED C99 compatible

From: brian m. carlson <hidden>
Date: 2025-05-29 23:13:08

On 2025-05-29 at 16:17:14, Junio C Hamano wrote:
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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help