summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-04-21 07:49:08 +0000
committerPatrick Steinhardt <ps@pks.im>2017-04-21 07:49:08 +0000
commit13c275aba50346b56f9a6787a9e3f3d73ec0c9a9 (patch)
treeefca139a9f99d08d76e1de5029bb8d240e3211ea
parentf4d1592c2f18f7bb6bbf7eba417708892ba19acd (diff)
downloadlibgit2-13c275aba50346b56f9a6787a9e3f3d73ec0c9a9.tar.gz
tests: threads::diff: fix warning for unused variable
The threads::diff test suite has a static variable `_retries`, which is used on Windows platforms only. As it is unused on other systems, the compiler throws a warning there. Fix the warning by wrapping the declaration in an ifdef.
-rw-r--r--tests/threads/diff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/threads/diff.c b/tests/threads/diff.c
index 90d35b15e..256040265 100644
--- a/tests/threads/diff.c
+++ b/tests/threads/diff.c
@@ -19,7 +19,9 @@ static git_repository *_repo;
static git_tree *_a, *_b;
static git_atomic _counts[4];
static int _check_counts;
+#ifdef GIT_WIN32
static int _retries;
+#endif
#define THREADS 20