util: add GIT_UNUSED_ARG

Add `GIT_UNUSED_ARG` which is an attribute for arguments, for
compatibility with dependencies.
This commit is contained in:
Edward Thomson
2023-05-11 21:43:38 +01:00
parent 2bbcdee6b6
commit a821455ee4

View File

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