Skip to content

Commit cf649a3

Browse files
committed
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+
2 parents a9514e3 + 7c07f36 commit cf649a3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git-compat-util.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,12 @@ struct strbuf;
189189
#define _NETBSD_SOURCE 1
190190
#define _SGI_SOURCE 1
191191

192-
#if defined(__GNUC__)
192+
#if GIT_GNUC_PREREQ(4, 5)
193193
#define UNUSED __attribute__((unused)) \
194194
__attribute__((deprecated ("parameter declared as UNUSED")))
195+
#elif defined(__GNUC__)
196+
#define UNUSED __attribute__((unused)) \
197+
__attribute__((deprecated))
195198
#else
196199
#define UNUSED
197200
#endif

0 commit comments

Comments
 (0)