summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2023-05-11 21:43:38 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2023-05-11 21:43:38 +0100
commita821455ee430d28d0032b91ba89b414b4b724464 (patch)
tree39c0eab0bb40d01ec7388544c1f02815a6988b5b
parent2bbcdee6b666f34e83d1cf9ca9badc66258202d6 (diff)
downloadlibgit2-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.h2
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 */