From patchwork Tue Jun 8 20:15:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1856 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director12.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id AHX0HaJcwGAsOQAAIUCqbw (envelope-from ) for ; Wed, 09 Jun 2021 02:16:02 -0400 Received: from proxy10.mail.ord1d.rsapps.net ([172.30.191.6]) by director12.mail.ord1d.rsapps.net with LMTP id GNjOHaJcwGBIAwAAIasKDg (envelope-from ) for ; Wed, 09 Jun 2021 02:16:02 -0400 Received: from smtp12.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy10.mail.ord1d.rsapps.net with LMTPS id 6IieHaJcwGD7BAAAfSg8FQ (envelope-from ) for ; Wed, 09 Jun 2021 02:16:02 -0400 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: 298fb104-c8ea-11eb-a645-52540070b731-1-1 Received: from [216.105.38.7] ([216.105.38.7:52678] 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 46/11-19348-1AC50C06; Wed, 09 Jun 2021 02:16:01 -0400 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.92.3) (envelope-from ) id 1lqrUH-0007Fs-LZ; Wed, 09 Jun 2021 06:14:49 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lqrUF-0007Fg-2Z for openvpn-devel@lists.sourceforge.net; Wed, 09 Jun 2021 06:14:47 +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:References: In-Reply-To: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3PTxyFtHlQdh0jcA2ef93O54//7TcgFeXITchlPPH48=; b=KNV0SCp2SesVXROF9yJuwBO98O Yf6G/BcteWyPv8VsWJG+PwVO2reHlj4pqL46aIBdVvAfZnoLK5V9gRCx4Wax6kE0iFSPageYFsZy3 mggupTtOf2SY+iiX3WCdIscKQEEB5I41H932KH/sU6CXybSlqRXAGtpssumZcj8Ahcm4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=3PTxyFtHlQdh0jcA2ef93O54//7TcgFeXITchlPPH48=; b=h8Zc9d7k9iVC4sOkpspuN8BWvf Zyl8kQIkQX+vsLAJEYF6n0Uar9+rXBKBXULjvVh0dMKhAWEzCdQP5KxzIRsWHPSYAvp22uZ6hq9TE B8BStDUhVmPs2o0smeVBZUiQ99/etBlF+5Awh0qruckKIWKAKWa8nTAW6V3m+2YLqmRU=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1lqrUC-0006Nw-4E for openvpn-devel@lists.sourceforge.net; Wed, 09 Jun 2021 06:14:47 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Wed, 9 Jun 2021 08:15:32 +0200 Message-Id: <20210609061532.12774-1-a@unstable.cc> In-Reply-To: <20210608194330.1431202-1-arne@rfc2549.org> References: <20210608194330.1431202-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: unstable.cc] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1lqrUC-0006Nw-4E Subject: [Openvpn-devel] [PATCH v2] Silence warning about format string in check_ca_required 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 From: Arne Schwabe clang does not like if the format argument of printf like function is not a string literal (or constant): warning: format string is not a string literal (potentially insecure) Make the format string constant to silence the warning. Signed-off-by: Arne Schwabe Signed-off-by: Antonio Quartulli Acked-by: masquerading as "pick-your-name" Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
--- Changes from v1: * use const string instead of introducing "%s". @Arne I anticipated this change because I "assumed" you would be ok with it (patch is still yours), but feel free to comment of course. src/openvpn/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 819979b1..086f7b6e 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -2069,7 +2069,7 @@ check_ca_required(const struct options *options) return; } - const char* str = "You must define CA file (--ca)" + const char* const str = "You must define CA file (--ca)" #ifndef ENABLE_CRYPTO_MBEDTLS " or CA path (--capath)" #endif