Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-10-18 00:56:34 +0300
committerJunio C Hamano <gitster@pobox.com>2022-10-18 00:56:34 +0300
commit44ec91ba4fdef84628f35b90a7d939d2c561cb12 (patch)
tree64de4a5d66cd16b316bc96be6033fd5deb010eda /git-compat-util.h
parentaff81ec1c89e9eb84ecf8bc1b5c3bf1ddb593d5d (diff)
parent7c07f36ad20ff206f6ed1a5609b295ec471b6cca (diff)
Merge branch 'ab/unused-annotation'
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.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index bac663353d..ea53ea4a78 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