Commit 13c275aba50346b56f9a6787a9e3f3d73ec0c9a9

Patrick Steinhardt 2017-04-21T07:49:08

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/tests/threads/diff.c b/tests/threads/diff.c
index 90d35b1..2560402 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