From patchwork Tue Nov 24 19:06:43 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5784 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:91c9:10b0:11b:d6c:f273 with SMTP id tl9-n1csp4681965lad; Tue, 24 Nov 2026 11:07:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErHzmTMfn1A2NCaInyou2e6mtT3o3r4f6IsL9yDG+zwNDXJFHXb5OJqhV/p+zSH7L1+5muAs/7YRx9Q=@openvpn.net X-Received: by 2002:a05:6870:8109:b0:49b:a468:6415 with SMTP id 586e51a60fabf-4bc8357174emr13564606fac.22.1795547249995; Tue, 24 Nov 2026 11:07:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795547249; cv=none; d=google.com; s=arc-20260327; b=O2ywIkoGxUNjzZrYAZIEdy8qI0S3F5y5DEAIX5bqWncuSE84Doqg8h/VZ+6IrjogY9 B2frIZZUgxMa7bR6JdJNVJQS6NUl2Xd3NnNikySJYrIsLZbZvPWyh963m2ua8dyLGviX /YNzN6x3bC4V2lalUKdpvjHkY8//r53ekvKOif2tZF9CI10qEqZgBWAIQjr8eC4F0Zji yyuWa9/Sqw6NQKTk598jSJZEpCTDh8wqYUJ3BSjGRCdrzHo03LN6+0f5NWVv9XfXZvFN tPfZm9dZm4xyo4/1aAMggE5hPMiipYxcN6LI1otELIEzLc84kIM3P3v1pGJuoRFtl/x3 J/lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; 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=R6FOoaEp3G1MoqzzMPA/G8gAdh1wWVfF+cuIePZtTl8=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=WmTOCPR4dT5/slTkNlPLmjvEHAEwhlxpWFmOFtT9Omp3vZfCuf9ochdlcuwLuezQL7 nFgXsqjPFMtPM6OSPFOXHwd51yF9j4UcKTrzsRHEka3z4aJtqcOq6+NHZCnnGPGB0H+/ LGJX0zLFtSKWC1fI+KTYrKG7JSQscspTjxdLnBzxJuIpEny6Mj+vXwcDYBR4tTxkJjKN MGE9rhFTwZCD2wHtiGhw1im61zkPsJsO8H9ATcnTUo1RgbXYd+SD5M/F/ZHeHnYe/4by 9hU9vLSNaaWxG5RZ8Oqqzem449e5Jlw5RNvk8CF+9IwnzeXzOq1q8U0yOJNo7pbWCvOn wEPg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=RwAk4exA; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=VwoPOlKF; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=JgYYyJIO; 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 586e51a60fabf-4bc63530c5asi22903105fac.358.2026.11.24.11.07.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Nov 2026 11:07:29 -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=pass header.i=@lists.sourceforge.net header.s=beta header.b=RwAk4exA; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=VwoPOlKF; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=JgYYyJIO; 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-Unsubscribe-Post: List-Owner; bh=R6FOoaEp3G1MoqzzMPA/G8gAdh1wWVfF+cuIePZtTl8=; b=RwAk4exAYaUnB3 7LIsz3JmgfAG42tlPGrNHVh1s7ilTnOaTDXRFvVyCzKi6JPYDMY1YUVSeMaNviqoMaTiVFEJ0SKAa 316aLn2828GUKuWO2ekAiNUgY2oqcLJH6/hxAEwxQRsinS85jEtfdIuHcw07DQu5uDSe45GFCu3wu DO8=; 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.100.1) (envelope-from ) id 1xVvrU-000000001Sg-3rmW; Tue, 24 Nov 2026 19:07:28 +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.100.1) (envelope-from ) id 1xVvrC-000000001QZ-3ltO for openvpn-devel@lists.sourceforge.net; Tue, 24 Nov 2026 19:07:10 +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-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=pUQ732BhG95VU+CixRmPyZh07G0dCY5CwkOtwWiD9wI=; b=VwoPOlKFWBTF05tBAy5p0zt8Ri QlSHIFQ+bXdD1uN1/nJbyoLLzksJhzjC8XMvtQCClCMK7C8eLY3uEsdSCpxCTy7Tj8eM938XMUIxB fNCQ+bEjtyTtT+q4HEGS9aawd2eaa5SBPl0oPkLoxEB6zW70Ldy58Q7gv++A+jfb1piA=; 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-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pUQ732BhG95VU+CixRmPyZh07G0dCY5CwkOtwWiD9wI=; b=JgYYyJIOCJVeZNTW37A3QDQV9p Gnn1s7m9iq7T5cEuZIsvO2fetkJC3/CnxrVTfLEb6mOQ7gI2rigu4oemienG4zHeaCW3iCX65xqbv 7B5K1UPk9bld0vLWnzNuwkKhKQDPo8JDkyxq5jKGFCbDFlGfDp31cGTC1HnU4vhIBl7I=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xVvqx-00000000249-1epB for openvpn-devel@lists.sourceforge.net; Tue, 24 Nov 2026 19:06:56 +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 6AOJ6mC5016768 for ; Tue, 24 Nov 2026 20:06:48 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6AOJ6mGO016767 for openvpn-devel@lists.sourceforge.net; Tue, 24 Nov 2026 20:06:48 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 24 Nov 2026 20:06:43 +0100 Message-ID: <20261124190648.16745-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.55.0 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-1.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 Use openvpn_send to avoid warnings due to Windows/Unix differences. Change-Id: I87dd41b66f7d77cab7aaf80fa9d9095e46c033d5 Signed-off-by: Frank Lichtenheld Acked-by: Razvan Cojocaru Gerrit URL: https://gerrit.openvpn.net/c/o [...] 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: 1xVvqx-00000000249-1epB Subject: [Openvpn-devel] [PATCH v2] manage: Fix conversion warnings in man_write 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: 1882767753101440781 X-GMAIL-MSGID: 1882767753101440781 From: Frank Lichtenheld Use openvpn_send to avoid warnings due to Windows/Unix differences. Change-Id: I87dd41b66f7d77cab7aaf80fa9d9095e46c033d5 Signed-off-by: Frank Lichtenheld Acked-by: Razvan Cojocaru Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2339 --- 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/+/2339 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Razvan Cojocaru diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index addd6f2..e917b35 100644 --- a/src/openvpn/manage.c +++ b/src/openvpn/manage.c @@ -2448,11 +2448,6 @@ #endif /* ifdef TARGET_ANDROID */ -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-conversion" -#endif - static ssize_t man_read(struct management *man) { @@ -2550,14 +2545,14 @@ static ssize_t man_write(struct management *man) { - const int size_hint = 1024; + const size_t size_hint = 1024; ssize_t sent = 0; buffer_list_aggregate(man->connection.out, size_hint); const struct buffer *buf = buffer_list_peek(man->connection.out); - if (buf && BLEN(buf)) + if (buf && BLEN(buf) > 0) { - const int len = min_int(size_hint, BLEN(buf)); + const size_t len = min_size(size_hint, BLENZ(buf)); #ifdef TARGET_ANDROID if (man->connection.fdtosend > 0) { @@ -2568,7 +2563,7 @@ else #endif { - sent = send(man->connection.sd_cli, CBSTR(buf), len, MSG_NOSIGNAL); + sent = openvpn_send(man->connection.sd_cli, CBSTR(buf), len, MSG_NOSIGNAL); } if (sent >= 0) { @@ -2591,10 +2586,6 @@ return sent; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - static void man_connection_clear(struct man_connection *mc) {