Skip to content

Commit

Permalink
Add annotation of nowarn next to pthread_exit.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerhard committed Nov 22, 2023
1 parent f12a392 commit be9171b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/regression/76-memleak/16-no-mem-leak-thread-exit-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ int main(int argc, char const *argv[]) {
pthread_t t1;
pthread_create(&t1, NULL, f1, NULL);

pthread_exit(NULL);

// A pthread_exit called in main will wait for other threads to finish
// Therefore, no memory leak here
return 0; // NOWARN
pthread_exit(NULL); // NOWARN

return 0; // NOWARN (unreachable)
}

0 comments on commit be9171b

Please sign in to comment.