Skip to content

Commit

Permalink
Merge pull request #55 from ECP-VeloC/warnings
Browse files Browse the repository at this point in the history
silence compiler warnings for unused vars
  • Loading branch information
adammoody authored Dec 16, 2023
2 parents dec4668 + cac2815 commit f792556
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
10 changes: 0 additions & 10 deletions src/redset_reedsolomon.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,6 @@ int redset_reedsolomon_decode(
size_t chunk_size)
{
int i;
int j;

int rc = REDSET_SUCCESS;

Expand Down Expand Up @@ -820,9 +819,6 @@ int redset_recover_rs_rebuild(
}
}

/* size of header as encoded in redundancy file */
off_t header_size = 0;

/* exchange headers and open each of our files for reading or writing */
kvtree* current_hash = NULL;
kvtree* send_hash = NULL;
Expand All @@ -840,9 +836,6 @@ int redset_recover_rs_rebuild(
/* read in the header */
kvtree_read_fd(chunk_file, fd_chunk, header);

/* get offset into file immediately following the header */
header_size = lseek(fd_chunk, 0, SEEK_CUR);

/* get file info for this rank */
current_hash = kvtree_getf(header, "%s %d", REDSET_KEY_COPY_RS_DESC, d->rank);

Expand Down Expand Up @@ -977,9 +970,6 @@ int redset_recover_rs_rebuild(

/* write chunk file header */
kvtree_write_fd(chunk_file, fd_chunk, header);

/* get offset into file immediately following the header */
header_size = lseek(fd_chunk, 0, SEEK_CUR);
}

kvtree_delete(&recv_hash);
Expand Down
8 changes: 3 additions & 5 deletions src/redset_reedsolomon_pthreads.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ static int reduce_rs_pthread_teardown(threadset_t* tset)
int ret = REDSET_SUCCESS;

/* signal each thread with 0 work to indicate it should exit */
size_t offset = 0;
for (i = 0; i < tset->num; i++) {
pthread_mutex_lock(&tset->data[i].mutex);
tset->data[i].n = 0;
Expand All @@ -371,11 +370,10 @@ static int reduce_rs_pthread_teardown(threadset_t* tset)
}

/* free condition variables and mutexes */
int rc;
for (i = 0; i < tset->num; i++) {
rc = pthread_cond_destroy(&tset->data[i].cond_thread);
rc = pthread_cond_destroy(&tset->data[i].cond_main);
rc = pthread_mutex_destroy(&tset->data[i].mutex);
pthread_cond_destroy(&tset->data[i].cond_thread);
pthread_cond_destroy(&tset->data[i].cond_main);
pthread_mutex_destroy(&tset->data[i].mutex);
}

/* free memory in data structure */
Expand Down
8 changes: 3 additions & 5 deletions src/redset_xor_pthreads.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ static int reduce_xor_pthread_teardown(threadset_t* tset)
int ret = REDSET_SUCCESS;

/* signal each thread with 0 work to indicate it should exit */
size_t offset = 0;
for (i = 0; i < tset->num; i++) {
pthread_mutex_lock(&tset->data[i].mutex);
tset->data[i].n = 0;
Expand All @@ -295,11 +294,10 @@ static int reduce_xor_pthread_teardown(threadset_t* tset)
}

/* free condition variables and mutexes */
int rc;
for (i = 0; i < tset->num; i++) {
rc = pthread_cond_destroy(&tset->data[i].cond_thread);
rc = pthread_cond_destroy(&tset->data[i].cond_main);
rc = pthread_mutex_destroy(&tset->data[i].mutex);
pthread_cond_destroy(&tset->data[i].cond_thread);
pthread_cond_destroy(&tset->data[i].cond_main);
pthread_mutex_destroy(&tset->data[i].mutex);
}

/* free memory in data structure */
Expand Down

0 comments on commit f792556

Please sign in to comment.