clar: Fix warnings in GCC/Linux
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
diff --git a/tests-clar/checkout/conflict.c b/tests-clar/checkout/conflict.c
index d261f38..66965a8 100644
--- a/tests-clar/checkout/conflict.c
+++ b/tests-clar/checkout/conflict.c
@@ -1071,6 +1071,9 @@ static void collect_progress(
{
git_vector *paths = payload;
+ (void)completed_steps;
+ (void)total_steps;
+
if (path == NULL)
return;
diff --git a/tests-clar/pack/indexer.c b/tests-clar/pack/indexer.c
index 17ec7b3..ccb88b9 100644
--- a/tests-clar/pack/indexer.c
+++ b/tests-clar/pack/indexer.c
@@ -100,7 +100,6 @@ void test_pack_indexer__fix_thin(void)
unsigned char buffer[128];
int fd;
ssize_t read;
- git_off_t left;
struct stat st;
const char *name = "pack-11f0f69b334728fdd8bc86b80499f22f29d85b15.pack";
@@ -108,7 +107,6 @@ void test_pack_indexer__fix_thin(void)
cl_assert(fd != -1);
cl_git_pass(p_stat(name, &st));
- left = st.st_size;
cl_git_pass(git_indexer_stream_new(&idx, ".", NULL, NULL, NULL));
read = p_read(fd, buffer, sizeof(buffer));
diff --git a/tests-clar/threads/refdb.c b/tests-clar/threads/refdb.c
index f8d76cb..3c651e3 100644
--- a/tests-clar/threads/refdb.c
+++ b/tests-clar/threads/refdb.c
@@ -147,13 +147,16 @@ static void *delete_refs(void *arg)
void test_threads_refdb__edit_while_iterate(void)
{
int r, t;
- git_thread th[THREADS];
int id[THREADS];
git_oid head;
git_reference *ref;
char name[128];
git_refdb *refdb;
+#ifdef GIT_THREADS
+ git_thread th[THREADS];
+#endif
+
g_repo = cl_git_sandbox_init("testrepo2");
cl_git_pass(git_reference_name_to_id(&head, g_repo, "HEAD"));
@@ -187,7 +190,6 @@ void test_threads_refdb__edit_while_iterate(void)
#ifdef GIT_THREADS
cl_git_pass(git_thread_create(&th[t], NULL, fn, &id[t]));
#else
- th[t] = t;
fn(&id[t]);
#endif
}