From patchwork Wed Jan 12 23:14:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 2216 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.30.191.6]) by backend41.mail.ord1d.rsapps.net with LMTP id GExAAdT732HDGgAAqwncew (envelope-from ) for ; Thu, 13 Jan 2022 05:15:48 -0500 Received: from proxy16.mail.ord1d.rsapps.net ([172.30.191.6]) by director8.mail.ord1d.rsapps.net with LMTP id eGEqFdT732HlIAAAfY0hYg (envelope-from ) for ; Thu, 13 Jan 2022 05:15:48 -0500 Received: from smtp12.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy16.mail.ord1d.rsapps.net with LMTPS id EF/MFNT732EmFAAAetu3IA (envelope-from ) for ; Thu, 13 Jan 2022 05:15:48 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp12.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: c697435c-7459-11ec-9090-52540070b731-1-1 Received: from [216.105.38.7] ([216.105.38.7:55834] helo=lists.sourceforge.net) by smtp12.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 94/42-28649-3DBFFD16; Thu, 13 Jan 2022 05:15:48 -0500 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1n7x7w-0001NK-Ow; Thu, 13 Jan 2022 10:14:41 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1n7x7u-0001NA-7z for openvpn-devel@lists.sourceforge.net; Thu, 13 Jan 2022 10:14:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=86VSbKGpF3bFhFtEMaAhm7k2N7vuD9boqQlUyV7khow=; b=hAEVfWIjuGez44WDQskC3+gQjk nD5A9JUIjAoUUfka4lWy6gjp981q2nn4rcBb96nGFtQMsldjKQN9mrANOX2GvuLMSGs/OvvBmD9io pBAbUGZqw2/CTbneUedOCnFe+WS8L2Pwiki9W5PKVWVRKV2ZpQL9GGhwynZtQUjIqh+E=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=86VSbKGpF3bFhFtEMaAhm7k2N7vuD9boqQlUyV7khow=; b=J BFntKJ/Q1CiBn7cB3nsvwXRDZGzjeG1oDmZeOz65J2x1XYnF41gYlZgRmtVcvT5EVzlWxAi1rDYG9 Yr2mQQrflJ49Enx/Il0N075EOldKquDyj5DKndhS5oCSEPM46b6vE2tudVzWvQ6/ARFecqnXUgWD7 f+VsOnsW4BYCCxxc=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1n7x7s-00EQIC-Is for openvpn-devel@lists.sourceforge.net; Thu, 13 Jan 2022 10:14:38 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Thu, 13 Jan 2022 11:14:34 +0100 Message-Id: <20220113101434.30223-1-a@unstable.cc> MIME-Version: 1.0 X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: signal_handler() is unused on Windows and generates a warning. Confine it within "ifdef _WIN32" in order to reduce the compilation noise. Signed-off-by: Antonio Quartulli --- src/openvpn/sig.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Content analysis details: (-0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1n7x7s-00EQIC-Is Subject: [Openvpn-devel] [PATCH] sig.c: define signal_handler on non-windows only X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Antonio Quartulli Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox signal_handler() is unused on Windows and generates a warning. Confine it within "ifdef _WIN32" in order to reduce the compilation noise. Signed-off-by: Antonio Quartulli Acked-by: Gert Doering --- src/openvpn/sig.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openvpn/sig.c b/src/openvpn/sig.c index eadd7109..9747c083 100644 --- a/src/openvpn/sig.c +++ b/src/openvpn/sig.c @@ -214,7 +214,7 @@ signal_restart_status(const struct signal_info *si) #endif /* ifdef ENABLE_MANAGEMENT */ } - +#ifndef _WIN32 /* normal signal handler, when we are in event loop */ static void signal_handler(const int signum) @@ -222,6 +222,7 @@ signal_handler(const int signum) throw_signal(signum); signal(signum, signal_handler); } +#endif /* set handlers for unix signals */