deprecation: add `used` attribute Recent GCC enables `-Wunused-const-variables`, which makes output quite noisy. Disable unused warnings for our deprecated variables.
diff --git a/include/git2/common.h b/include/git2/common.h
index 8d3d3c1..70c02a4 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -59,6 +59,7 @@ typedef size_t size_t;
#if defined(__GNUC__)
# define GIT_DEPRECATED(func) \
__attribute__((deprecated)) \
+ __attribute__((used)) \
func
#elif defined(_MSC_VER)
# define GIT_DEPRECATED(func) __declspec(deprecated) func