Skip to content

Commit

Permalink
clar: Fix warnings in GCC/Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
vmg committed Nov 1, 2013
1 parent 0bfa732 commit d3ed210
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions tests-clar/checkout/conflict.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,9 @@ static void collect_progress(
{
git_vector *paths = payload;

(void)completed_steps;
(void)total_steps;

if (path == NULL)
return;

Expand Down
2 changes: 0 additions & 2 deletions tests-clar/pack/indexer.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,13 @@ 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";

fd = p_open(name, O_RDONLY);
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));
Expand Down
6 changes: 4 additions & 2 deletions tests-clar/threads/refdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit d3ed210

Please sign in to comment.