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+
This commit is contained in:
Junio C Hamano 2022-10-27 15:24:12 -07:00
Родитель a9514e3b95 7c07f36ad2
Коммит cf649a3613
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -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