From 862fc01cebf4aed02220d5b370cfbe65c3852d9d Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Mon, 15 Jul 2024 08:21:32 -0700 Subject: [PATCH] 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 fed21d1d6..279a3f6dd 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 }