diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2023-05-11 21:43:38 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2023-05-11 21:43:38 +0100 |
commit | a821455ee430d28d0032b91ba89b414b4b724464 (patch) | |
tree | 39c0eab0bb40d01ec7388544c1f02815a6988b5b | |
parent | 2bbcdee6b666f34e83d1cf9ca9badc66258202d6 (diff) | |
download | libgit2-a821455ee430d28d0032b91ba89b414b4b724464.tar.gz |
util: add GIT_UNUSED_ARG
Add `GIT_UNUSED_ARG` which is an attribute for arguments, for
compatibility with dependencies.
-rw-r--r-- | src/util/cc-compat.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 */ |