From patchwork Wed Jun 19 11:02:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "plaisthos (Code Review)" X-Patchwork-Id: 3737 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:a501:b0:57d:b2cb:6cf with SMTP id hh1csp206088mab; Wed, 19 Jun 2024 04:03:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXChlJDDgPlDNXnT48YJzBWD0NNGf0JyVMBbzddXc1vob+A0HIvddWCim++2AbNPv50xitjdL7XjosxnMqUIE0xk8g+YOg= X-Google-Smtp-Source: AGHT+IE+dF4lamTxTX87kSQsB4pvm5H3VpKeWJcXw3LqYTUMUHhNO5ijz4e5NYRrM0A7i9OAoZU3 X-Received: by 2002:a17:90b:300c:b0:2c2:204d:6c2 with SMTP id 98e67ed59e1d1-2c7b5d51897mr2092355a91.2.1718795033081; Wed, 19 Jun 2024 04:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718795033; cv=none; d=google.com; s=arc-20160816; b=HXxhg4EK3ZYaj9BDayJP5GlxV412XwcZxIRa4SfFYvbGAe5EHU1f+bmEspWQNy0H6h ZZx7J4sOEqulj3u3H9JLiez4JbXEZb6ApN1zV8EaCxV67o5MiWPx8fLotB3anN04TnA4 tB68CO1xUQ4/2SEL7az1gW9YTspENqPWzwRJP33bcrXnm/trF6CBf4RB2e69s5nSMOWS iAfVtuVjPgbFKPxJ3/yjs70GOXhfDZO4nV+pCbqPc7S/GU6WxPd9Jr6EjLzfU/G9/HuD xol6ANkesJwEDNEQMRkZrRbchIKQFmKl1ffIMAkKcAVs7MJGQFZoeQShvpLzgcL8Ka7w 2gKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=f2qBr5DzQf3eXEakDKHz752SCe2AffreFPKs86Qg40Y=; fh=GFP4qDxgyJ2WEPo/oeLZg3Mj4NqvY1j2nTvTt7psNwg=; b=zDvValKoCDRthkiPZmbe0CT6lXOC06WQns6q44xM4jqFAwQPNcxSvzOEKDZUTOGXqo c30uP4xG1XPQfYIbeYPcLehTIcP2KKS82jvXjhoNaFUTTxA30aM+shKADpeteRX3Fqi8 KSMS+mVXfFc7Qv4lS8F8RCI4hnFkzj2tDtSnRprSKlksPZi8+CizYGAi5W6+8Ra6sJtu 8OjA52ZRpeLrZmTtfxUcTxSFgLJT/+4wnYlB263AzeFgJAFThnuE5ESdByIjwUrHQ8zg Uc8G+ye496ZY6YhX1D9giuPP2z1j7LeG8ovoUTD9QERYvaBzitjTJ3EtgEoh4RAx+oDG GBXg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Hh7sBggQ; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=G9ZZwLve; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=GA5le4JD; 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=openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c4c45fecb7si12189838a91.14.2024.06.19.04.03.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Jun 2024 04:03:53 -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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Hh7sBggQ; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=G9ZZwLve; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=GA5le4JD; 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=openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1sJt63-0004DH-O6; Wed, 19 Jun 2024 11:03:23 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sJt5u-0004Cx-1W for openvpn-devel@lists.sourceforge.net; Wed, 19 Jun 2024 11:03:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=QGY6egWa0TbUOwuG6yQnbsTpLoSnSr1C9fDGyO/cOg8=; b=Hh7sBggQtnuTh7EFCnTfWm+Tt6 KfUEV7Y0F5cdUZdQ9jYYfzE7ZKter1dBIMeIlqWAdIYlhxOSwC2gaQvqX8mfVZW+aj7xXi5sD0sEf KLuCTx/bhbrQAHjF/xR2A/eDdhXQEze9WWo+KlEurB7u/UJ0hWNd2LYfMqNfsHXFBoiw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=QGY6egWa0TbUOwuG6yQnbsTpLoSnSr1C9fDGyO/cOg8=; b=G 9ZZwLveaXcSoybN23QcBPAkWOiX4ZXOsn3ORVh2fcCPND2hrdxkkdsaX6U4igxvsA8ygvaGuDI66i YF11khOBr5rGjrYTJc/FgFelaOvcMzXR2/eD0Exn39Ad3ma+Z0sopaTqf5OVCxd5QRWF14Wr4/+mv bbxdc1bke97VjSGo=; Received: from mail-wm1-f46.google.com ([209.85.128.46]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1sJt5s-0003Oq-Ut for openvpn-devel@lists.sourceforge.net; Wed, 19 Jun 2024 11:03:13 +0000 Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4218314a6c7so54724635e9.0 for ; Wed, 19 Jun 2024 04:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1718794981; x=1719399781; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=QGY6egWa0TbUOwuG6yQnbsTpLoSnSr1C9fDGyO/cOg8=; b=GA5le4JDx6uZH02xeYWU1dZsHIr2OyHyn2NL3XSZllBsJX6mvX2HMgBm/P5owXwYyW SqIsoSOAs4IQ5x2/NqSdfNTDs3ymtTltXQbMCbhJDOym79NFfLT8Dah/UtD9SYGTgTU2 KLf4O+d/qNrW6ZhXJHwTSLdVETQCC+4hUBASkiatoy6O8LJTSGvwTkEQU4WwQqr1Gi1R +HPPxv+sZWgtm5MS1Ks4Ne50G7zkfbiOoXRYZpyHJsjNwhULMqNuDiExC37i1nXPJ6dc ar97+emf0/BVwYVcm1gKkneM0sKpVAtLk7KLaF7YM0MDhkzzgewAILvKP13FoAdQAxjF JMyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718794981; x=1719399781; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QGY6egWa0TbUOwuG6yQnbsTpLoSnSr1C9fDGyO/cOg8=; b=U9UYK+M2pg5UUgHv/97gnOm1YmAIR9vM1Bx1NuAzlSA0iO0MJ0td27r5hp4fnj7wml yYn2+wkWxae4C04eEdn78FXsiIeYBY+woB4T3vA4kFa4tN2d8JUjpbZ8WtSULjEt/ocL KGdrwZPeK8kXePKIikmZvswhsHWrRd9mD9fLekGUzJ/ScLzfija838EdJvN9NkxH+tXH 3HnK1MKsUeD7GmdCGyrpDMLUWlDzCUewEyH7mVmO8mHUsl2sxweGq8IaWSnBgSokmbqT oqP5wuZw4homy+G3i/x4bHlpalrZYOP1z7e8zq7T50mNnlcOJoUrlYJTDfjUeQ1bzKdq 0aFw== X-Gm-Message-State: AOJu0YxEgOjx3BIybyTVr34NMCTHKz4V+dBtScQm3p/V5F6nl0DyAVP7 PuYSCKKIqBoNIIGr7k1YXr52AnNkUd8e+lFivx5tXVF/sBnPFJm+djenwM5z2m4xcYdRxfrgdM6 S X-Received: by 2002:a05:600c:430c:b0:422:760c:e8b9 with SMTP id 5b1f17b1804b1-4247529bc39mr16083365e9.35.1718794980485; Wed, 19 Jun 2024 04:03:00 -0700 (PDT) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422874de618sm264438425e9.37.2024.06.19.04.02.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 04:03:00 -0700 (PDT) From: "flichtenheld (Code Review)" X-Google-Original-From: "flichtenheld (Code Review)" X-Gerrit-PatchSet: 1 Date: Wed, 19 Jun 2024 11:02:59 +0000 To: plaisthos Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: I6e08920e4cf4762b9f14a7461a29fa77df15255c X-Gerrit-Change-Number: 667 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: 2229fba8750dc277884f4010b95e4499b90c9c0b References: Message-ID: <9f344a39d07987d5f25eba2383a618db5ba56509-HTML@gerrit.openvpn.net> MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.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: Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit Content analysis details: (-0.2 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_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.46 listed in list.dnswl.org] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.128.46 listed in sa-trusted.bondedsender.org] 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. [209.85.128.46 listed in bl.score.senderscore.com] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.46 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1sJt5s-0003Oq-Ut Subject: [Openvpn-devel] [S] Change in openvpn[master]: configure: Add -Wstrict-prototypes and -Wold-style-definition 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: , Reply-To: frank@lichtenheld.com, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1802287220392342954?= X-GMAIL-MSGID: =?utf-8?q?1802287220392342954?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/667?usp=email to review the following change. Change subject: configure: Add -Wstrict-prototypes and -Wold-style-definition ...................................................................... configure: Add -Wstrict-prototypes and -Wold-style-definition These are not covered by -Wall (nor -Wextra) but we want to enforce them. Change-Id: I6e08920e4cf4762b9f14a7461a29fa77df15255c Signed-off-by: Frank Lichtenheld --- M configure.ac M src/openvpn/dco.h M src/openvpn/dco_linux.c M src/openvpn/sig.c M src/openvpn/ssl.c M src/openvpn/ssl.h M src/openvpn/xkey_helper.c M src/openvpn/xkey_provider.c 8 files changed, 9 insertions(+), 7 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/67/667/1 diff --git a/configure.ac b/configure.ac index 2e5ab6a..c01ad09 100644 --- a/configure.ac +++ b/configure.ac @@ -1408,6 +1408,8 @@ ) ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-stringop-truncation]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wstrict-prototypes]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wold-style-definition]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wall]) if test "${enable_pedantic}" = "yes"; then diff --git a/src/openvpn/dco.h b/src/openvpn/dco.h index 50ebb35..cb0adcd 100644 --- a/src/openvpn/dco.h +++ b/src/openvpn/dco.h @@ -247,7 +247,7 @@ * * @return list of colon-separated ciphers */ -const char *dco_get_supported_ciphers(); +const char *dco_get_supported_ciphers(void); #else /* if defined(ENABLE_DCO) */ diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c index b2584b9..277cd64 100644 --- a/src/openvpn/dco_linux.c +++ b/src/openvpn/dco_linux.c @@ -1053,7 +1053,7 @@ } const char * -dco_get_supported_ciphers() +dco_get_supported_ciphers(void) { return "AES-128-GCM:AES-256-GCM:AES-192-GCM:CHACHA20-POLY1305"; } diff --git a/src/openvpn/sig.c b/src/openvpn/sig.c index cfbd942..8323f0d 100644 --- a/src/openvpn/sig.c +++ b/src/openvpn/sig.c @@ -448,7 +448,7 @@ } void -halt_low_priority_signals() +halt_low_priority_signals(void) { #ifndef _WIN32 struct sigaction sa; diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index 2054eb4..17078c9 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -277,7 +277,7 @@ #endif void -enable_auth_user_pass() +enable_auth_user_pass(void) { auth_user_pass_enabled = true; } diff --git a/src/openvpn/ssl.h b/src/openvpn/ssl.h index 98e59e8..0e2a43f 100644 --- a/src/openvpn/ssl.h +++ b/src/openvpn/ssl.h @@ -381,7 +381,7 @@ void pem_password_setup(const char *auth_file); /* Enables the use of user/password authentication */ -void enable_auth_user_pass(); +void enable_auth_user_pass(void); /* * Setup authentication username and password. If auth_file is given, use the diff --git a/src/openvpn/xkey_helper.c b/src/openvpn/xkey_helper.c index 283c95d..b68fb43 100644 --- a/src/openvpn/xkey_helper.c +++ b/src/openvpn/xkey_helper.c @@ -49,7 +49,7 @@ XKEY_EXTERNAL_SIGN_fn xkey_management_sign; static void -print_openssl_errors() +print_openssl_errors(void) { unsigned long e; while ((e = ERR_get_error())) diff --git a/src/openvpn/xkey_provider.c b/src/openvpn/xkey_provider.c index f5fc956..964d2eb 100644 --- a/src/openvpn/xkey_provider.c +++ b/src/openvpn/xkey_provider.c @@ -155,7 +155,7 @@ keymgmt_import_helper(XKEY_KEYDATA *key, const OSSL_PARAM params[]); static XKEY_KEYDATA * -keydata_new() +keydata_new(void) { xkey_dmsg(D_XKEY, "entry");