From patchwork Fri Feb 3 19:14:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3042 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp1375694dyk; Fri, 3 Feb 2023 11:15:21 -0800 (PST) X-Google-Smtp-Source: AK7set8lBhSsYYFxhPdAE2fDqGGHJbB2mEhyba4BbvBA85qG0uNJoWvUQf2Ka0a/OXiCj10AA/F7 X-Received: by 2002:a17:90a:1943:b0:22c:9078:17f with SMTP id 3-20020a17090a194300b0022c9078017fmr11468706pjh.48.1675451721603; Fri, 03 Feb 2023 11:15:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675451721; cv=none; d=google.com; s=arc-20160816; b=tg5ZIbSdX1CxiP4Ahj28OT84gJ/CHo5/+C2Mu1Ty/kKM3GY40tQ3YpJRgsw1oEIZbY C6lr5+z6Il9jKSwPtVD9r9gPWA42k/4la+WK09iu4WBAvsfjo02ct+3jdwOMIpOTQ4w5 ud8MK6vxZa35ezsLK6EzBxlA80+P3SGubyHNGAhowlZcS8Z8Isy5Vmi+v7PvKJdrAvlE qEQc6/Twfg0a76rt+o94R7DkSiYO8cqxt3o744QzWB6pHPtva3TTQ308PbO9j+Dz5Mj3 lZzX5Zp36gz5e8C4g8O83OVcPjO4qu/mxVXxY1eNHqD6fC7DVDk7xxRmxlVAsj1ae0M0 Aaig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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; bh=NMu0s2H2jQQ0wsY6ybjW3Le1eM8EpPrS4XxNgpOV7To=; b=Rzl4JMhbt5kteNS3JVqrWbgkUzCQ+aYIkRh9Evlok1otdQjadsgA6lUbJWNXWL8Mye 33PR1dWt6SrVA/JzLgTKWSuBBhGBQDUnkMDA7gY3lyYxJA9jXCweK6mcK+PBMlEw5k7a qJNndXpxvQoFsPOmAo7uJLsKfL6FII0/GF4WWP84QiwdnHUqly/qRvwxwTqzBn3MsRnL 8Qs4+YRBacuWfVlsItpvObQ52eLoQtudApoyaDyWV6v+R1pH3+I9kGYbmuXGkl1nhaos SENC1sonwbKK3aSsS2H//Ud73urIUg8x4X15ZN7B6HYFX6PDWB9/KjUh+ECCUslg3HGi se5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=O8eRJQSa; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=jXlBF83S; 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 y5-20020a17090aa40500b0022c67694b0asi8315869pjp.186.2023.02.03.11.15.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Feb 2023 11:15:21 -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=O8eRJQSa; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=jXlBF83S; 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-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pO1WZ-0004rV-Tu; Fri, 03 Feb 2023 19:15:02 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pO1WY-0004rE-Vd for openvpn-devel@lists.sourceforge.net; Fri, 03 Feb 2023 19:15:01 +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=sG2IJWOusmkCoo0DTWGRH24sdNqLNmKDOObYSjUs+gE=; b=O8eRJQSaq1gnn8lOADi0rXliYO aHq8Z09FwcLMrDGGlz5zeQu1/PEdDkN/pdKxqRCcWSSovAFia9TT7AI+vKvWjCF9f3dpmuvtsiwwj hnJWWalDKWKyQ0JBnDcb3SlX3yFjNd6wZALVdR4m9hLAGx7xkpcp5lapsmJffib+IjWA=; 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=sG2IJWOusmkCoo0DTWGRH24sdNqLNmKDOObYSjUs+gE=; b=jXlBF83S2S6eODClS2G6HTH2db ToKTEUURNH6M6JKZk2b/JLSieK4nYseE0vr7Edt6xC0pXNPZBFXbiQyWi5oym+d0YGETFkdXjkbqM D4ulTvS2lmuytEWh6xszA2GLfgE5xv37LbSo8OuQ9uUngQRN2165ojsKvGQCDp/cIR00=; Received: from mout-p-103.mailbox.org ([80.241.56.161]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pO1WS-00AMfc-Rb for openvpn-devel@lists.sourceforge.net; Fri, 03 Feb 2023 19:15:01 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4P7lhj6nJQz9t1K for ; Fri, 3 Feb 2023 20:14:45 +0100 (CET) From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Fri, 3 Feb 2023 20:14:40 +0100 Message-Id: <20230203191440.136050-6-frank@lichtenheld.com> In-Reply-To: <20230203191440.136050-1-frank@lichtenheld.com> References: <20230203191440.136050-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Spam-Score: -0.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: On Linux those functions actually take void pointer, so no behavior change there. On Windows, we avoid warnings about unsigned char vs char. Signed-off-by: Frank Lichtenheld --- src/openvpn/manage.c | 4 ++-- src/openvpn/proxy.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) Content analysis details: (-0.7 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.161 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1pO1WS-00AMfc-Rb Subject: [Openvpn-devel] [PATCH 5/5] Windows: fix signedness errors with recv/send 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?1756838464478001070?= X-GMAIL-MSGID: =?utf-8?q?1756838464478001070?= On Linux those functions actually take void pointer, so no behavior change there. On Windows, we avoid warnings about unsigned char vs char. Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering --- src/openvpn/manage.c | 4 ++-- src/openvpn/proxy.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index 8397d3cf..3ea1992b 100644 --- a/src/openvpn/manage.c +++ b/src/openvpn/manage.c @@ -2251,7 +2251,7 @@ man_read(struct management *man) man->connection.lastfdreceived = fd; } #else /* ifdef TARGET_ANDROID */ - len = recv(man->connection.sd_cli, buf, sizeof(buf), MSG_NOSIGNAL); + len = recv(man->connection.sd_cli, (void *)buf, sizeof(buf), MSG_NOSIGNAL); #endif if (len == 0) @@ -2348,7 +2348,7 @@ man_write(struct management *man) } else #endif - sent = send(man->connection.sd_cli, BPTR(buf), len, MSG_NOSIGNAL); + sent = send(man->connection.sd_cli, (const void *)BPTR(buf), len, MSG_NOSIGNAL); if (sent >= 0) { buffer_list_advance(man->connection.out, sent); diff --git a/src/openvpn/proxy.c b/src/openvpn/proxy.c index aa10363c..ed47eaa2 100644 --- a/src/openvpn/proxy.c +++ b/src/openvpn/proxy.c @@ -126,7 +126,7 @@ recv_line(socket_descriptor_t sd, } /* read single char */ - size = recv(sd, &c, 1, MSG_NOSIGNAL); + size = recv(sd, (void *)&c, 1, MSG_NOSIGNAL); /* error? */ if (size != 1)