Skip to content

Commit

Permalink
Suppress unused variable warning in helper_thread.c
Browse files Browse the repository at this point in the history
Allows `-Wunused-but-set-variable` to pass in opt mode. Adds what appears to be a missing assert.
  • Loading branch information
r-barnes committed Jul 15, 2024
1 parent 2cb0841 commit 862fc01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helper_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,12 @@ static void block_signals(void)
sigset_t sigmask;

int ret;
(void)ret; // Suppress unused variable warning

ret = pthread_sigmask(SIG_UNBLOCK, NULL, &sigmask);
assert(ret == 0);
ret = pthread_sigmask(SIG_BLOCK, &sigmask, NULL);
assert(ret == 0);
#endif
}

Expand Down

0 comments on commit 862fc01

Please sign in to comment.