From patchwork Fri May 9 09:09:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4244 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:a32a:b0:656:592e:a137 with SMTP id jh42csp318923mab; Fri, 9 May 2025 02:10:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVs4gUG+jS5z+cFSReWittCWEzGkK2Y+fao1MEpx4C1BGBRMIZQ1oj54w7T4HR2yojajL7U3H4G9aY=@openvpn.net X-Google-Smtp-Source: AGHT+IGAXYdxbaZa3FMEWpo7vmoL2xg9x3M5ROZRUXjCu3d+0RCE/bRPZl3twKEvDBJGTEeALiNe X-Received: by 2002:a05:6830:6083:b0:72b:7e3c:727c with SMTP id 46e09a7af769-73226b03f0fmr1817406a34.23.1746781820996; Fri, 09 May 2025 02:10:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746781820; cv=none; d=google.com; s=arc-20240605; b=LtQviNfRS7Yxuxr3wuL/Sra606pYUJup/Pa8PBE7MQwvzBWZKORKKcH7i6b/naOw0l S2AHcVoMrATsJcSAutjk3P8jn4TI0PzPLsVf/ui8Z2HnjGQ45kCUlk0qxeQMmE9lx+v9 oGI9MY7JlZP+oy9KaBo77sCuTcVDiSe6h6qJguval4hudE1WA9auniN2W0QF/Mn7P0N6 qTbnQz4Xa+tV3hRIcwx8N4UsFwO7TvkQ8NLp1J8Xt+iywbwzI85whmi0+S9GSnCW44kw UlKLMzg5tKdalLm8k7KjrhnRyUVckK+LwH2q3ZoT5dxPuI1EEI6Cruhi7Kf/N0R+NUB2 wbYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=8HBnL+YTyV0Raqho/S15Ctc6bTuRaJuKIycP/0nmKdM=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=OTfRI9RbQBkKD5fEE9iEQZvfDZXnXaD4yyWXmBRuAx5j8RPIJwghWJPRHW2+5cNJWw RSo3xWafbqFrw434O8JkO7LvN+G7oYwg5VCD5OLzOHJ24iUVQKdCWD/ZDnyOvSu073KY 31GEvqEp6eQ+fm56rM1D8ACX24iUCErrovqGceyaXyS7G2TEWQFJXy6V2LnwaIUhSdBE J36PyWFk/5TE9vvsWnhcZ7RD7co1qK8693b0cLsgEETYjAm05qBcc58Eg23GVvHdrEoy TuHvYQmYhq09S0MVbih/lEc7K8e1epwk4QItZoVquARaj/M/WBC3x2B1xTY919Qt6G6Z bD7w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=PAS5I6Tz; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=a1X1RlVw; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=d15ixas7; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 46e09a7af769-7322665934bsi1059454a34.226.2025.05.09.02.10.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 May 2025 02:10:20 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=PAS5I6Tz; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=a1X1RlVw; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=d15ixas7; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8HBnL+YTyV0Raqho/S15Ctc6bTuRaJuKIycP/0nmKdM=; b=PAS5I6TzdCBYfi9ne+x9Jm0KVA mgAEeZAWRh3ESo+50plolBGcoZ5e01xuHdHnR528Bu2yngXjSjQT+w3LktbXiuDRhcavTXGdAu7nS hd6n5PIuxhP2jSJpJPtdVs16ad/yQSIZfiIQ8lqdkd12SrmUTvEp//pS2bdOhm/LojHw=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1uDJkH-0001SV-Dw; Fri, 09 May 2025 09:10:17 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1uDJjr-0001OJ-Co for openvpn-devel@lists.sourceforge.net; Fri, 09 May 2025 09:09:51 +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:To:From:Sender:Reply-To:Cc: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=yMryd4vAna4X6AGD7xa1vZEZ7GyUJ8hYg+0dnxm3dCE=; b=a1X1RlVwJ2Jbpg43KBBdMLVRBl o/F9a8eEtHz8H4Iu9tBbEHEDt4MEPyZWk3aoHrHXDeasIDurs6vzDbDHhAasNaqBwohR5ONrZOowG wRis6iePyPr/u7h0fqHCQojWRGgdBHAU2rZ8t6LppRTrbJtJoxSYQAXjmxogd0GPkVTM=; 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:To:From:Sender:Reply-To:Cc: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=yMryd4vAna4X6AGD7xa1vZEZ7GyUJ8hYg+0dnxm3dCE=; b=d15ixas7qwO3084DCmbVa+QHF8 jm9G8rNgzFO+0cpleeDUW4ZKvn4JDU6rdt2ToBJGqBBwtGNVdmiyGx/6H44nq74Ke7rWEHe9arpnm nek2quDYVsPdDTD3/FIcjIa8/h37sVtGqLbvkAFoDHF0i+F1UuZfQ0YW03WR/lw3slUE=; Received: from [193.149.48.143] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1uDJjp-0002Ma-CW for openvpn-devel@lists.sourceforge.net; Fri, 09 May 2025 09:09:51 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 54999bTM018839 for ; Fri, 9 May 2025 11:09:37 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 54999blu018838 for openvpn-devel@lists.sourceforge.net; Fri, 9 May 2025 11:09:37 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Fri, 9 May 2025 11:09:31 +0200 Message-ID: <20250509090936.18818-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.7 (+) 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: From: Frank Lichtenheld Also fix one issue reported by the build. Change-Id: I28af9eac2e9fb615903a82c8f4087602b72c134d Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- Content analysis details: (1.7 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 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: configure.ac] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [193.149.48.143 listed in bl.score.senderscore.com] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [193.149.48.143 listed in sa-trusted.bondedsender.org] 0.4 NO_DNS_FOR_FROM DNS: Envelope sender has no MX or A DNS records 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_FAIL SPF: HELO does not match SPF record (fail) [SPF failed: Rejected by SPF record] 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1uDJjp-0002Ma-CW Subject: [Openvpn-devel] [PATCH v2] CMake: Sync list of compiler flags with configure.ac 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1831633494868044458?= X-GMAIL-MSGID: =?utf-8?q?1831633494868044458?= From: Frank Lichtenheld Also fix one issue reported by the build. Change-Id: I28af9eac2e9fb615903a82c8f4087602b72c134d Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/923 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/CMakeLists.txt b/CMakeLists.txt index 6687b56..c19d29a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,13 @@ CACHE STRING "Flags used by the C++ compiler during AddressSanitizer builds." FORCE) +function(check_and_add_compiler_flag flag variable) + check_c_compiler_flag(${flag} ${variable}) + if (${variable}) + add_compile_options(${flag}) + endif() +endfunction() + if (MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS) if (USE_WERROR) @@ -96,11 +103,9 @@ endif() else () add_compile_options(-Wall -Wuninitialized) - check_c_compiler_flag(-Wno-stringop-truncation NoStringOpTruncation) - - if (${NoStringOpTruncation}) - add_compile_options(-Wno-stringop-truncation) - endif() + check_and_add_compiler_flag(-Wno-stringop-truncation NoStringOpTruncation) + check_and_add_compiler_flag(-Wstrict-prototypes StrictPrototypes) + check_and_add_compiler_flag(-Wold-style-definition OldStyleDefinition) # We are not ready for this #add_compile_options(-Wconversion -Wno-sign-conversion -Wsign-compare) if (USE_WERROR) diff --git a/tests/unit_tests/openvpn/test_cryptoapi.c b/tests/unit_tests/openvpn/test_cryptoapi.c index 98102ef..478995f 100644 --- a/tests/unit_tests/openvpn/test_cryptoapi.c +++ b/tests/unit_tests/openvpn/test_cryptoapi.c @@ -116,7 +116,7 @@ /* Fill-in certs[] array */ void -init_cert_data() +init_cert_data(void) { struct test_cert certs_local[] = { {cert1, key1, cname1, "OVPN TEST CA1", "OVPN Test Cert 1", hash1, 1},