| Message ID | 20230109113046.1678-1-lstipakov@gmail.com |
|---|---|
| State | Accepted |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp2778279dyk;
Mon, 9 Jan 2023 03:31:59 -0800 (PST)
X-Google-Smtp-Source:
AMrXdXtP7Qi23XuFbxz+CCVEHSgTQSDL4qhwWT8rcK8fLjj028muSlVFBxfFYfQm7bK9Lo29h6oK
X-Received: by 2002:a17:90b:3782:b0:226:ecec:9e6a with SMTP id
mz2-20020a17090b378200b00226ecec9e6amr8182044pjb.21.1673263919619;
Mon, 09 Jan 2023 03:31:59 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1673263919; cv=none;
d=google.com; s=arc-20160816;
b=IBt/oAKapyjlgeH0O7eG2/FGkDlQsU5oPOuXmYbBr7zJBEdnj6qaUZ4njheUCZ4JHH
XoYrXW0+dlmLM8IRhwjNYYZ0DH/R29vFyio1kMbXZTcoC/4RoZ3awwE76OYwA/0rq1+0
y8cjcyt8WtL7zsjrAh45ErIbdE5fZ7Moilr0J0APMMPCx8akl93WMn0EnJCVIPjLItbw
xov6LOa90hOab2L+6YUstn2fUeaBNpY2lOFC9JPxYZ7+hoKWcqBAgTNem2vhelFpYKWA
EAquS/CAgbrXZMo07cfNsx7gJg0TO6F5yIjSasAG9vKONHRiMDqeTz+NCv+v/N6augFc
rXMw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=errors-to:content-transfer-encoding:cc:list-subscribe:list-help
:list-post:list-archive:list-unsubscribe:list-id:precedence:subject
:mime-version:message-id:date:to:from:dkim-signature:dkim-signature
:dkim-signature;
bh=YSOM0uZ0AIZoe5ZKpuKPEb8qG7cqTTM6VkDgRvN/UY8=;
b=RxOX/T1yBgZZDBIa9Gbfyr8udehnQ+Aq31tx/MulwRsi993v+DEZ1CYTjy9l3j+8Qb
sqhul6MMqu48aMPNmL7rOsBSSoc9mRhO5YkRkChsI0NpVJq0eJ6qnnlQIpRIRXrgk9Pd
Erd1KR5FjgdVhnBIyEBIi2aFnnS/SHvg4NfTVIQGwMJcIA3+uhqOrDoP/HmX84BX4X0l
0yp4FDBky9LLPxT7YT4waV0q9XoUI5L/xmr/a0pNpFkFU7ns+LN9G56gufgmX+tslGWp
AS+4ftNKjlnWjFJVa8Wv5iuZ8YU3SC1wlqjdqDhXB24bH6pQFYEXsPaGZi5L8x7mrODe
em1A==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=IKXOxm0R;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=lqvwdj+a;
dkim=neutral (body hash did not verify) header.i=@gmail.com
header.s=20210112 header.b=FmrqsZKF;
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=QUARANTINE dis=NONE) header.from=gmail.com
Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7])
by mx.google.com with ESMTPS id
lw18-20020a17090b181200b00226e0a6c643si10710440pjb.51.2023.01.09.03.31.59
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Mon, 09 Jan 2023 03:31:59 -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=IKXOxm0R;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=lqvwdj+a;
dkim=neutral (body hash did not verify) header.i=@gmail.com
header.s=20210112 header.b=FmrqsZKF;
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=QUARANTINE dis=NONE) header.from=gmail.com
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 <openvpn-devel-bounces@lists.sourceforge.net>)
id 1pEqNK-0006nO-8i;
Mon, 09 Jan 2023 11:31:34 +0000
Received: from [172.30.20.202] (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 <lstipakov@gmail.com>) id 1pEqN5-0006n7-3u
for openvpn-devel@lists.sourceforge.net;
Mon, 09 Jan 2023 11:31:19 +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: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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=nfPP3yRywIee2m7x5AyBE4MjXJzc7izC8p6u9qJJzik=; b=IKXOxm0R4ZDrArYYdqmQOOdztU
tjgYUT/KS2jkK6xR1V1+bzZ5BjI45DZ8HZVthDtXcyjEI7ax02AJFRjO2Fb7jZ7Ddwhz99HmIFqIL
j8j4rnKsCmRrlVepVHZZmnhrGloG6BBNMNPZITjQfV6kkw4ImdW9e5zLGJ7h3dXu4FCY=;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x
;
h=Content-Transfer-Encoding:MIME-Version: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:In-Reply-To:
References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:
List-Owner:List-Archive; bh=nfPP3yRywIee2m7x5AyBE4MjXJzc7izC8p6u9qJJzik=; b=l
qvwdj+a2zYeIsHUbeK8qDTQvM72cMq2gvqXlFkQcv1N1jhaJECJuZLb/695HDD1Jzz3CD9pummZLd
3vLOup6D0fEb5NaL6HaAitLykwvIE6CLVb6gZXgaFYy2O208Ylx54fnJjT/Xt5BI+pnHLHaOHRLFU
EumMx5+Ii4hjUNV4=;
Received: from mail-lf1-f50.google.com ([209.85.167.50])
by sfi-mx-2.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95)
id 1pEqMv-00010L-Cq for openvpn-devel@lists.sourceforge.net;
Mon, 09 Jan 2023 11:31:13 +0000
Received: by mail-lf1-f50.google.com with SMTP id bu8so12467249lfb.4
for <openvpn-devel@lists.sourceforge.net>;
Mon, 09 Jan 2023 03:31:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=nfPP3yRywIee2m7x5AyBE4MjXJzc7izC8p6u9qJJzik=;
b=FmrqsZKFUtfhzUOcY9pktaAdTun+iY4LQ8YSEdBNodW5dTMNJj6woIGkccY/bgbSxB
Ynp06UaPxyLv3H2LP3Zy1QUaOVFG6Mz48Bsd5mHoFKu4rgPO5u44S2ie1BwMwL/OqkHw
Pe+gBIIAVx/CXnGBgZjRHUpMVWjlgjbnWS/70YmxkWhAaExMqVNOjcRBufll7a41minT
kd5/5/dkgBs4jIjt1WdaMyeasdj5rp7xwQwmptntUGTVyEVALxbpzkzGefOhGiFAExdz
nd+t4qGOENS5JNeBXfJVnaTzqywx7KB4JzDDkrN6t8LHf2+U2yzTV+S5oAFX3ttS82vp
1Kjw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=nfPP3yRywIee2m7x5AyBE4MjXJzc7izC8p6u9qJJzik=;
b=dy0Vp+yW1sGQ6vKBHFAwQus5gWZwcQmmm+TjUNtgtfARvArFeGQ6PFPJO1k59lLKfZ
HhBLXonJCeTXnkxH5UVTcxlqFlmvv5ZvY0grDgWFCZFiF6nnaayRceOTUR/9JzxGrk9U
jKWtP+toectFnUCOrNy59eN0F0/4ZAIX+sLLKBxMe8RQRbxT9c7hzxTA5vyL1NaP9srb
QjC9nMWOqYOCsfqlWBltQ+gboFW0MC/zWvRf5zj32k41QiZTHcJxb2YlVmlmwQPf6kAW
/4I/f27tM8iv5spyQqeB2DogwcoDD7suS3tXoeruHzjKpLMjdFc2EKdkeud1Lepcp516
Exig==
X-Gm-Message-State: AFqh2kq7XWxmDZIOYN92h8L7wjPo8/IAVCpB8rFZmzKy81iSuqBWl02o
HC/+hjDOBzh6JbPC5IJXTIc+tdb/BKc=
X-Received: by 2002:a05:6512:1049:b0:4a4:68b9:66e5 with SMTP id
c9-20020a056512104900b004a468b966e5mr19322539lfb.48.1673263861776;
Mon, 09 Jan 2023 03:31:01 -0800 (PST)
Received: from localhost.localdomain ([2a00:1d50:3:0:6bb8:4a62:3984:f58f])
by smtp.gmail.com with ESMTPSA id
s9-20020a056512314900b004b591c33b99sm1581134lfi.13.2023.01.09.03.31.00
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Mon, 09 Jan 2023 03:31:01 -0800 (PST)
From: Lev Stipakov <lstipakov@gmail.com>
To: openvpn-devel@lists.sourceforge.net
Date: Mon, 9 Jan 2023 13:30:46 +0200
Message-Id: <20230109113046.1678-1-lstipakov@gmail.com>
X-Mailer: git-send-email 2.38.1.windows.1
MIME-Version: 1.0
X-Spam-Score: -0.2 (/)
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: From: Lev Stipakov We got warnings from MinGW about function
being defined but not used when compiling modules which include tun.h. This
function is not defined as inline, so its definition should not be in header.
Since this is not a performance critical, no need to make it inline.
Content analysis details: (-0.2 points, 6.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider [lstipakov[at]gmail.com]
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/,
no trust [209.85.167.50 listed in list.dnswl.org]
0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
-0.0 SPF_PASS SPF: sender matches SPF record
-0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2)
[209.85.167.50 listed in wl.mailspike.net]
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's domain
-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.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Headers-End: 1pEqMv-00010L-Cq
Subject: [Openvpn-devel] [PATCH] tun: move print_windows_driver() out of
tun.h
X-BeenThere: openvpn-devel@lists.sourceforge.net
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <openvpn-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel>
List-Post: <mailto:openvpn-devel@lists.sourceforge.net>
List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe>
Cc: Lev Stipakov <lev@openvpn.net>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: openvpn-devel-bounces@lists.sourceforge.net
X-getmail-retrieved-from-mailbox: Inbox
X-GMAIL-THRID: =?utf-8?q?1754544387498954756?=
X-GMAIL-MSGID: =?utf-8?q?1754544387498954756?=
|
| Series |
[Openvpn-devel] tun: move print_windows_driver() out of tun.h
|
|
Commit Message
Lev Stipakov
Jan. 9, 2023, 11:30 a.m. UTC
From: Lev Stipakov <lev@openvpn.net> We got warnings from MinGW about function being defined but not used when compiling modules which include tun.h. This function is not defined as inline, so its definition should not be in header. Since this is not a performance critical, no need to make it inline. Leave declaration in tun.h and move definition to tun.c. Signed-off-by: Lev Stipakov <lev@openvpn.net> --- src/openvpn/tun.c | 19 +++++++++++++++++++ src/openvpn/tun.h | 20 ++------------------ 2 files changed, 21 insertions(+), 18 deletions(-)
Comments
Acked-by: Gert Doering <gert@greenie.muc.de> Thanks. Compile-tested on MinGW, it compiles and the warnings are gone. Your patch has been applied to the master and release/2.6 branch. commit a0eb1f764df39d9447b666e5a2cbd3aa01b41983 (master) commit 9dd0bfb5983fdfbbb9e1fe2195642fbc4cc5f200 (release/2.6) Author: Lev Stipakov Date: Mon Jan 9 13:30:46 2023 +0200 tun: move print_windows_driver() out of tun.h Signed-off-by: Lev Stipakov <lev@openvpn.net> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20230109113046.1678-1-lstipakov@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25923.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index a83ec9e6..6947312e 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -7028,6 +7028,25 @@ ipset2ascii_all(struct gc_arena *gc) return BSTR(&out); } +const char * +print_windows_driver(enum windows_driver_type windows_driver) +{ + switch (windows_driver) + { + case WINDOWS_DRIVER_TAP_WINDOWS6: + return "tap-windows6"; + + case WINDOWS_DRIVER_WINTUN: + return "wintun"; + + case WINDOWS_DRIVER_DCO: + return "ovpn-dco"; + + default: + return "unspecified"; + } +} + #else /* generic */ void diff --git a/src/openvpn/tun.h b/src/openvpn/tun.h index 24d52670..ed22770a 100644 --- a/src/openvpn/tun.h +++ b/src/openvpn/tun.h @@ -661,24 +661,8 @@ tuntap_is_dco_win_timeout(struct tuntap *tt, int status) return tuntap_is_dco_win(tt) && (status < 0) && (openvpn_errno() == ERROR_NETNAME_DELETED); } -static const char * -print_windows_driver(enum windows_driver_type windows_driver) -{ - switch (windows_driver) - { - case WINDOWS_DRIVER_TAP_WINDOWS6: - return "tap-windows6"; - - case WINDOWS_DRIVER_WINTUN: - return "wintun"; - - case WINDOWS_DRIVER_DCO: - return "ovpn-dco"; - - default: - return "unspecified"; - } -} +const char * +print_windows_driver(enum windows_driver_type windows_driver); #else /* ifdef _WIN32 */