Skip to content

Commit

Permalink
Fix compiler warnings with ENABLE_WARNINGS=ON
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Jun 27, 2024
1 parent bdd3a81 commit 0bd7a12
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@

int main(int argc, char **argv)
{
int ret;
int tid;
int ret = 0;

const char *usage = "Usage: %s [-h] [-v]\n";
int opt;
Expand All @@ -32,9 +31,9 @@ int main(int argc, char **argv)
}
}

#pragma omp parallel private(tid)
#pragma omp parallel
{
tid = omp_get_thread_num();
int tid = omp_get_thread_num();

// higher-level software must check for thread and process safety
// we assume thread 0 is responsible for monitor and control
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@

int main(int argc, char **argv)
{
int ret;
int tid;
int ret = 0;

const char *usage = "Usage: %s [-h] [-v]\n";
int opt;
Expand All @@ -32,9 +31,9 @@ int main(int argc, char **argv)
}
}

#pragma omp parallel private(tid)
#pragma omp parallel
{
tid = omp_get_thread_num();
int tid = omp_get_thread_num();

// higher-level software must check for thread and process safety
// we assume thread 0 is responsible for monitor and control
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@

int main(int argc, char **argv)
{
int ret;
int tid;
int ret = 0;

const char *usage = "Usage: %s [-h] [-v]\n";
int opt;
Expand All @@ -32,9 +31,9 @@ int main(int argc, char **argv)
}
}

#pragma omp parallel private(tid)
#pragma omp parallel
{
tid = omp_get_thread_num();
int tid = omp_get_thread_num();

// higher-level software must check for thread and process safety
// we assume thread 0 is responsible for monitor and control
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ static inline double do_work(int input)

int main(int argc, char **argv)
{
int ret;
int tid;
int ret = 0;
#ifdef SECOND_RUN
int i;
int size = 1E3;
Expand All @@ -52,9 +51,9 @@ int main(int argc, char **argv)
}
}

#pragma omp parallel private(tid)
#pragma omp parallel
{
tid = omp_get_thread_num();
int tid = omp_get_thread_num();

// higher-level software must check for thread and process safety
// we assume thread 0 is responsible for monitor and control
Expand Down

0 comments on commit 0bd7a12

Please sign in to comment.