From a821455ee430d28d0032b91ba89b414b4b724464 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Thu, 11 May 2023 21:43:38 +0100 Subject: util: add GIT_UNUSED_ARG Add `GIT_UNUSED_ARG` which is an attribute for arguments, for compatibility with dependencies. --- src/util/cc-compat.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/cc-compat.h b/src/util/cc-compat.h index a0971e86c..ede6e9aa9 100644 --- a/src/util/cc-compat.h +++ b/src/util/cc-compat.h @@ -43,8 +43,10 @@ __typeof__(x) _unused __attribute__((unused)); \ _unused = (x); \ } while (0) +# define GIT_UNUSED_ARG __attribute__((unused)) #else # define GIT_UNUSED(x) ((void)(x)) +# define GIT_UNUSED_ARG #endif /* Define the printf format specifier to use for size_t output */ -- cgit v1.2.1