diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-10-27 22:24:12 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-10-27 22:24:12 (GMT) |
commit | cf649a36138a99c66d6f3d4ccc7f80b29cc463e0 (patch) | |
tree | 8d9beab2c1e0016a3e96989aea8bd436d200cef5 /git-compat-util.h | |
parent | a9514e3b95028571c64f636082814fd5119df65d (diff) | |
parent | 7c07f36ad20ff206f6ed1a5609b295ec471b6cca (diff) | |
download | git-cf649a36138a99c66d6f3d4ccc7f80b29cc463e0.zip git-cf649a36138a99c66d6f3d4ccc7f80b29cc463e0.tar.gz git-cf649a36138a99c66d6f3d4ccc7f80b29cc463e0.tar.bz2 |
Merge branch 'ab/unused-annotation' into maint-2.38
Compilation fix for ancient compilers.
* ab/unused-annotation:
git-compat-util.h: GCC deprecated message arg only in GCC 4.5+
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index b90b647..045b47f 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -189,9 +189,12 @@ struct strbuf; #define _NETBSD_SOURCE 1 #define _SGI_SOURCE 1 -#if defined(__GNUC__) +#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 |