From 862fc01cebf4aed02220d5b370cfbe65c3852d9d Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Mon, 15 Jul 2024 08:21:32 -0700 Subject: [PATCH 1/2] Suppress unused variable warning in helper_thread.c Allows `-Wunused-but-set-variable` to pass in opt mode. Adds what appears to be a missing assert. --- helper_thread.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helper_thread.c b/helper_thread.c index fed21d1d61..279a3f6dda 100644 --- a/helper_thread.c +++ b/helper_thread.c @@ -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 } From 409ae9e40bc534e2dd43a04c2b8154b48fdce898 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Fri, 19 Jul 2024 10:46:10 -0700 Subject: [PATCH 2/2] Update helper_thread.c --- helper_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helper_thread.c b/helper_thread.c index 279a3f6dda..2440604c12 100644 --- a/helper_thread.c +++ b/helper_thread.c @@ -110,7 +110,7 @@ static void block_signals(void) sigset_t sigmask; int ret; - (void)ret; // Suppress unused variable warning + (void)ret; /* Suppress unused variable warning */ ret = pthread_sigmask(SIG_UNBLOCK, NULL, &sigmask); assert(ret == 0);