From patchwork Fri Oct 17 20:49:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4516 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:7d42:b0:72f:f16c:e055 with SMTP id fr2csp4747424mab; Fri, 17 Oct 2025 13:49:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV2N+pUP3m4tF0ZKeRI2DEq68gyQdVI1hZlpdUYSMMYDlSw1pL3FAF1iF0pp8ugnoVKa82Qvn9Aso8=@openvpn.net X-Google-Smtp-Source: AGHT+IGs4ORjXZI4HY6ZxSG8TSR6reMWFAGt5AlkthbZfpKuAIj7f3rt4TfyVNLCHmyEBdW4wzHU X-Received: by 2002:a05:6830:6d0e:b0:79d:4731:9739 with SMTP id 46e09a7af769-7c27c5e323cmr2579873a34.0.1760734166773; Fri, 17 Oct 2025 13:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1760734166; cv=none; d=google.com; s=arc-20240605; b=X8VnoDb40/uXxYM31IVmLylQQJEvM8gx4KJ0HoIIbwMUmMqYM0FzbaKVz3sFUsFLiO rbElrTaod+Hs5i7DW/kGxIU+nK7+TXimgGUA+VcTtVegyeMnS9KIdSyrzo8C3vXA03mW FrgxDrFg16tylHrwZGnoAUji++LztY9DP+SAFpRlzKqSX5fPHOqLbzNAwQS8CHoUkh7z 0IW7tvKjwEANrJweDlLU4BBOm4OXEPAsxPoTtT7/vYWymAco7J0p9zOyQl3buAj0oxfM EDjHxH9d9oLo739q/w/4ClPEGLX272NjtJ9yrIzD0iBN/DnqFR/7ty7kCs6UyhY4JBwo 6CyQ== 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=1yItUGmcvcZ2KmfSOyLvU2dReSqn5mm+CKWfxK8YV+g=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=XiuKI5bCBborRe4cwDpmUh33F414Ws44kKcmpeATcM41nhK7z+/ARzmoArfmCgYON2 MaKfIZByV/jUG01fzEe0COFDnZGkAqenK6NENYNcxDM5a2O2Nr36zYTv4OpQ/BZNu6Np vmtbvqs07z6SrnNUZsR/VB1O+9IPVNcCKIbAh0oiHbReho7TmbmdJK8vLamcihRZA0+5 LU5Z+noJoloAk2OqLL/WJB1IONfvwFtIGEFTa/JC7vF1Pt19MaisefBq3RkoE5lQdqYG /5H/uuI8cOdwenqO7Pav4wWYpP6FmM+6aDLC3NFxr/Heut34eZ5SUnBJth/8Dej+JgQt 7g5w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=ion69CYN; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=EpNXn44I; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="Zq/SGg3h"; 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-7c2887b6248si126872a34.83.2025.10.17.13.49.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Oct 2025 13:49:26 -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=ion69CYN; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=EpNXn44I; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="Zq/SGg3h"; 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=1yItUGmcvcZ2KmfSOyLvU2dReSqn5mm+CKWfxK8YV+g=; b=ion69CYNoXQFgOiEk2I9vCp95N os/QMrcJfkdpOdzR3Kqwf07GIa6mCaQpviI+vEEb6Bu3QJgdPxlpw7Tp8zzyyqIPF3XFBJ7ivTyuC e/vfMFoCJwb7hO58TQovmfo6m+sfTHyoz7BCYB0DWYGhezMb1C/wJYHot8sGQ58DaiZY=; 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.95) (envelope-from ) id 1v9rO6-0004tr-Iz; Fri, 17 Oct 2025 20:49:23 +0000 Received: from [172.30.29.66] (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.95) (envelope-from ) id 1v9rO5-0004tb-7L for openvpn-devel@lists.sourceforge.net; Fri, 17 Oct 2025 20:49:22 +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=TAhOyWnCULpKI6KBXX6xJWs3ixxRUl7kvI8PU6mMx0Q=; b=EpNXn44Is+2sJpvZkFCVVsrA3T Pk3+7qFKWtLwHX8BcTpATPXWFSTQ0GnvHxaeOvJX2+Yz8Pv/H52n4U0SlwkIxbS/mf/moXEFR3CqG zP4gpyIQ9woq0AIhuExZeUEv/3ufTuzxqxllYNJttfFpiYtxSfrzt3R+Hx6btTpQyRN4=; 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=TAhOyWnCULpKI6KBXX6xJWs3ixxRUl7kvI8PU6mMx0Q=; b=Zq/SGg3hZn7M80bZksCpgJG9Og cdNwxkPiHatyE+AsjxKqS/2N3rU7xGY+1VwDZN/fodIa6uHXCUQ29CDNUkWynLBiu24EwK/d8ddIy NE1VcGBXxzz2N2lsxLtLAuu3m8qaQ5ozCLiK6WWnrdI0PapfU5H58/2DGdCJCTsnEtSE=; Received: from [193.149.48.134] (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 1v9rO5-00069L-81 for openvpn-devel@lists.sourceforge.net; Fri, 17 Oct 2025 20:49:21 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 59HKnEMQ007573 for ; Fri, 17 Oct 2025 22:49:14 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 59HKnELc007572 for openvpn-devel@lists.sourceforge.net; Fri, 17 Oct 2025 22:49:14 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Fri, 17 Oct 2025 22:49:09 +0200 Message-ID: <20251017204914.7548-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.49.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-2.hosts.colo.sdot.me", 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 Just use correct type. Change-Id: I2d1fbe7ec080beb931253d09c1b5227e9bf4e756 Signed-off-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1281 --- Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1v9rO5-00069L-81 Subject: [Openvpn-devel] [PATCH v1] ssl_util: Fix conversion warning in get_num_elements 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?1846263589601963375?= X-GMAIL-MSGID: =?utf-8?q?1846263589601963375?= From: Frank Lichtenheld Just use correct type. Change-Id: I2d1fbe7ec080beb931253d09c1b5227e9bf4e756 Signed-off-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1281 --- 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/+/1281 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): diff --git a/src/openvpn/ssl_util.c b/src/openvpn/ssl_util.c index 50e8c03..fb7cf3e 100644 --- a/src/openvpn/ssl_util.c +++ b/src/openvpn/ssl_util.c @@ -290,21 +290,16 @@ return NULL; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - int get_num_elements(const char *string, char delimiter) { - int string_len = strlen(string); + const size_t string_len = strlen(string); ASSERT(0 != string_len); int element_count = 1; /* Get number of ciphers */ - for (int i = 0; i < string_len; i++) + for (size_t i = 0; i < string_len; i++) { if (string[i] == delimiter) { @@ -314,7 +309,3 @@ return element_count; } - -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif