Skip to content

Commit

Permalink
thread_tools: suppress -Wstringop-overflow false-positive
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper93 authored and Dudemanguy committed Oct 19, 2023
1 parent 4e6325d commit 500eb39
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions misc/thread_tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,14 @@ int mp_cancel_get_fd(struct mp_cancel *c)
{
pthread_mutex_lock(&c->lock);
if (c->wakeup_pipe[0] < 0) {
#if defined(__GNUC__) && !defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wstringop-overflow="
#endif
mp_make_wakeup_pipe(c->wakeup_pipe);
#if defined(__GNUC__) && !defined(__clang__)
# pragma GCC diagnostic pop
#endif
retrigger_locked(c);
}
pthread_mutex_unlock(&c->lock);
Expand Down

0 comments on commit 500eb39

Please sign in to comment.