summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-01-20 10:36:41 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2019-01-20 10:36:41 +0000
commit44827b6764da07e30eb6f7c97051d69956797fcb (patch)
tree1cc84a53396b03438aef038190e98259390fa17e
parent1758636b13a7a16df9ad900a0990ed844683c7ee (diff)
downloadlibgit2-44827b6764da07e30eb6f7c97051d69956797fcb.tar.gz
deprecation: add `used` attribute
Recent GCC enables `-Wunused-const-variables`, which makes output quite noisy. Disable unused warnings for our deprecated variables.
-rw-r--r--include/git2/common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/git2/common.h b/include/git2/common.h
index 8d3d3c111..70c02a48c 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