Skip to content

Commit 44827b6

Browse files
committed
deprecation: add used attribute
Recent GCC enables `-Wunused-const-variables`, which makes output quite noisy. Disable unused warnings for our deprecated variables.
1 parent 1758636 commit 44827b6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/git2/common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ typedef size_t size_t;
5959
#if defined(__GNUC__)
6060
# define GIT_DEPRECATED(func) \
6161
__attribute__((deprecated)) \
62+
__attribute__((used)) \
6263
func
6364
#elif defined(_MSC_VER)
6465
# define GIT_DEPRECATED(func) __declspec(deprecated) func

0 commit comments

Comments
 (0)