From patchwork Fri Feb 28 17:02:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 4161 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:a521:b0:5e7:b9eb:58e8 with SMTP id hh33csp1012249mab; Fri, 28 Feb 2025 09:02:51 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU7OHE6ixgESn7wawpJCA9izL+SYBfm7lyD/HvnuBVuxuutast21ojBaXLJ/RuUcQKITrqBt36aS14=@openvpn.net X-Google-Smtp-Source: AGHT+IGmmwKuF2szDHNGG1cz9jJqkh98rEqKCYqlL012okFuAMIayv8rxo+WXfc/PGHGpyZgO6C4 X-Received: by 2002:a05:6e02:12c4:b0:3d0:4700:db0f with SMTP id e9e14a558f8ab-3d3e6e6d719mr46782095ab.12.1740762170539; Fri, 28 Feb 2025 09:02:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740762170; cv=none; d=google.com; s=arc-20240605; b=c4vi1waOmV1oA4eQ10FzMVs9/oSFrIP5bvSy/eWgQYGPIfhtvS3IdkSHOSA4VrEg2G TZdzCPGAsj21BgQWkKypZcyFq5d0F8RB/TynopkZngnZI8tdURXEF9utHC+rxM8ReDKe k3RnaxlOo567AxYDOnrFkYpSswSlxWjghOUaed8Wpr5f6Olv1CevKWcDP3rMne+euJZ3 vrp1C5ZfJ8JJFAAlWN2RBp7Fow7F+LVuBvPeU4jzxjjpmPGMtNTAhUMph//m+1SI+aWv Me+Yu55fqUqevpv9UKfBsyhve7NMesGmG8YLVFTVXNqVd6N5V8oDg1Zy4CQw8w9WK5oH 7fxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:cc: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=+Zvq8NCQdKWmgHdHb7z5ZTNZAbFD/CH3LoKVOH1CVfk=; fh=CfxSpwd5kfiMJoL3kcov7PTxVKT7pGe/79idnx9XlBs=; b=Yq4afa6InWJjPLJMEI6iEiE7xOTefs+oo5ZmTpTwE16SQPfpQnHyKKBNfliej59BGZ fCtXOOVQG8i4TqwuDwDBx77Cvh3M2iXjTEUrc6vyAkOJt1F24jqKqVxkUjqCsqgBcx1s OBiULVl/l4J7MPEZMhvMHuB3X9sooMZMGN0mgrDJ0tYiRgJirUqYUgOcMPFOKUAXzGLy nWx+hR13h029dOCfH2EOCWDKuYnYsMqWgYAtcg5r/6EH2ZK9VfrSsvDLptc3IHqJMNIc pkBqgzvUBBwSN+m75pXTwEONiWbB5Vyvrn8Vsa1cQnHHQvbCqmV/GuSGOSawLWWkFV2K BujA==; 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=JwE2vJm2; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Ko5qcP4a; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=gETnyE3a; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id e9e14a558f8ab-3d3dee70f39si30795085ab.74.2025.02.28.09.02.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Feb 2025 09:02:50 -0800 (PST) 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=JwE2vJm2; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Ko5qcP4a; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=gETnyE3a; 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 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 1to3lA-0001nW-2X; Fri, 28 Feb 2025 17:02:48 +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 1to3l6-0001nL-6U for openvpn-devel@lists.sourceforge.net; Fri, 28 Feb 2025 17:02: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=ZW1fjf0Zh5ymbCAg4dM6O74kEyVPwUvnkgWuy5nRfmw=; b=JwE2vJm2C5JJl1DqkL2Wf/DZ6y UpTTfAEYhVNIq+WRmqBZChjPVubyndso87dTI+SShGubhGMqTUb/+VICxVtjcRBsvvXtIoJzi1ol/ b1tkhcOuDWsVFBmU/ITstQEAuJV7aXbew3/VkE7Q3Eb4kTFDq39SNruMNzyLRiALeoHY=; 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=ZW1fjf0Zh5ymbCAg4dM6O74kEyVPwUvnkgWuy5nRfmw=; b=Ko5qcP4a7s4ehf0Gcc7s74KpA3 zbjeJTsINm3xI/+b8Za7TzfFsXzsfcCgyJYfnYxdJnImsoUe3lTTpbdUXA0JGrUwgthYIFfVuuwKC Vy7ci8uzJnq9g9YNVZqI4fsMnnU8haMSgXZ2xpWzipcC528U+QHSbxSVEHUa0N3cMgAA=; Received: from mout-p-201.mailbox.org ([80.241.56.171]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1to3l4-0003LU-Pe for openvpn-devel@lists.sourceforge.net; Fri, 28 Feb 2025 17:02:44 +0000 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Z4DzG2gTBz9stM; Fri, 28 Feb 2025 18:02:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1740762154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZW1fjf0Zh5ymbCAg4dM6O74kEyVPwUvnkgWuy5nRfmw=; b=gETnyE3a4LQYrhVIs1TJkAdj5r+wjctKNFcSSZrY7Gi+TiSRb0AKSSaeTfYXrv63lC+UJ1 664v0XyUnghoj/7KSY1+goMF1k+FaU43GKA9bSV+npipRI2xQp2IdFEwDAQT3A8gEZEVN+ GgAsQJYlybd/W4MVZjo5KN0GYK0SdJMqp0fnzB58VDv1nqzm0BWoLShGoZyxxyLpdDTGG3 GTJtxrJ3z/xclY1GHv4SOzJWR9fcig2QWExqDBkHOaqdtVKK8eFGcj5IXFzt1HTqiNcZgi o+sZHvFAWJ7OEZY7Z2qmC3hidpeDYcNqjnC4ctkweHBj6gM7gbOQFIAFSCRumQ== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Fri, 28 Feb 2025 18:02:32 +0100 Message-Id: <20250228170232.322186-1-frank@lichtenheld.com> In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 4Z4DzG2gTBz9stM X-Spam-Score: -0.9 (/) 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: To make it easier to exclude them from compiler warnings. Based on the existing comment in init.c Change-Id: I925accd8267f94ecfd9ccea85bae965dc2a10208 Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- Content analysis details: (-0.9 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 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. [80.241.56.171 listed in sa-trusted.bondedsender.org] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.171 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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_SIGNED Message has a DKIM or DK signature, not necessarily valid 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. [80.241.56.171 listed in bl.score.senderscore.com] X-Headers-End: 1to3l4-0003LU-Pe Subject: [Openvpn-devel] [PATCH v3] Add more "intentional fallthrough" comments 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: Arne Schwabe Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1825321433815151847?= X-GMAIL-MSGID: =?utf-8?q?1825321433815151847?= To make it easier to exclude them from compiler warnings. Based on the existing comment in init.c Change-Id: I925accd8267f94ecfd9ccea85bae965dc2a10208 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/+/864 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/src/openvpn/list.c b/src/openvpn/list.c index 69f1510..6987def 100644 --- a/src/openvpn/list.c +++ b/src/openvpn/list.c @@ -437,34 +437,44 @@ { case 11: c += ((uint32_t) k[10] << 24); + /* Intentional [[fallthrough]]; */ case 10: c += ((uint32_t) k[9] << 16); + /* Intentional [[fallthrough]]; */ case 9: c += ((uint32_t) k[8] << 8); + /* Intentional [[fallthrough]]; */ /* the first byte of c is reserved for the length */ case 8: b += ((uint32_t) k[7] << 24); + /* Intentional [[fallthrough]]; */ case 7: b += ((uint32_t) k[6] << 16); + /* Intentional [[fallthrough]]; */ case 6: b += ((uint32_t) k[5] << 8); + /* Intentional [[fallthrough]]; */ case 5: b += k[4]; + /* Intentional [[fallthrough]]; */ case 4: a += ((uint32_t) k[3] << 24); + /* Intentional [[fallthrough]]; */ case 3: a += ((uint32_t) k[2] << 16); + /* Intentional [[fallthrough]]; */ case 2: a += ((uint32_t) k[1] << 8); + /* Intentional [[fallthrough]]; */ case 1: a += k[0]; diff --git a/src/openvpn/push.c b/src/openvpn/push.c index ddad109..914f520 100644 --- a/src/openvpn/push.c +++ b/src/openvpn/push.c @@ -98,6 +98,7 @@ case AR_INTERACT: ssl_purge_auth(false); + /* Intentional [[fallthrough]]; */ case AR_NOINTERACT: /* SOFT-SIGTUSR1 -- Auth failure error */