diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-10-28 00:24:12 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-10-28 00:24:12 +0200 |
commit | cf649a36138a99c66d6f3d4ccc7f80b29cc463e0 (patch) | |
tree | 8d9beab2c1e0016a3e96989aea8bd436d200cef5 | |
parent | Merge branch 'tb/midx-repack-ignore-cruft-packs' into maint-2.38 (diff) | |
parent | git-compat-util.h: GCC deprecated message arg only in GCC 4.5+ (diff) | |
download | git-cf649a36138a99c66d6f3d4ccc7f80b29cc463e0.tar.xz git-cf649a36138a99c66d6f3d4ccc7f80b29cc463e0.zip |
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+
-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 b90b64718e..045b47f83a 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 |