Commit cf9709b64eb49d5a0ee1181b80c950e518fb45b0

Vicent Marti 2013-04-22T16:53:46

tests: Do not warn for unused variable

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/tests-clar/object/cache.c b/tests-clar/object/cache.c
index ed13a6f..b36bf27 100644
--- a/tests-clar/object/cache.c
+++ b/tests-clar/object/cache.c
@@ -195,10 +195,13 @@ static void *cache_raw(void *arg)
 void test_object_cache__threadmania(void)
 {
 	int try, th, max_i;
-	git_thread t[THREADCOUNT];
 	void *data;
 	void *(*fn)(void *);
 
+#ifdef GIT_THREADS
+	git_thread t[THREADCOUNT];
+#endif
+
 	for (max_i = 0; g_data[max_i].sha != NULL; ++max_i)
 		/* count up */;