git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] git-compat-util.h: GCC deprecated only takes a message in GCC 4.5+
@ 2022-10-03 21:23 Aleajndro R Sedeño
  2022-10-03 22:25 ` brian m. carlson
  0 siblings, 1 reply; 13+ messages in thread
From: Aleajndro R Sedeño @ 2022-10-03 21:23 UTC (permalink / raw)
  To: git; +Cc: Alejandro R. Sedeño, Alejandro R Sedeño

From: Alejandro R. Sedeño <asedeno@mit.edu>

Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Signed-off-by: Alejandro R Sedeño <asedeno@google.com>
---
 git-compat-util.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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
-- 
2.38.0.rc1.362.ged0d419d3c-goog


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-10-11  0:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-03 21:23 [PATCH] git-compat-util.h: GCC deprecated only takes a message in GCC 4.5+ Aleajndro R Sedeño
2022-10-03 22:25 ` brian m. carlson
2022-10-03 23:45   ` Alejandro R. Sedeño
2022-10-05 14:53     ` Jeff King
2022-10-06  7:29       ` Ævar Arnfjörð Bjarmason
2022-10-06 12:16         ` Jeff King
2022-10-06 21:15           ` Ævar Arnfjörð Bjarmason
2022-10-11  0:22             ` Jeff King
     [not found]   ` <xmqqilkynd91.fsf@gitster.g>
2022-10-05 22:19     ` [PATCH] git-compat-util.h: GCC deprecated message arg only " Aleajndro R Sedeño
2022-10-06  7:31       ` Ævar Arnfjörð Bjarmason
2022-10-06 12:24         ` Alejandro R. Sedeño
2022-10-05 22:22     ` [PATCH] git-compat-util.h: GCC deprecated only takes a message " Alejandro R. Sedeño
2022-10-06  7:33   ` Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).