From patchwork Wed Nov 24 05:03:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lev Stipakov X-Patchwork-Id: 2088 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director14.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id KA6fL6BinmE5FgAAIUCqbw (envelope-from ) for ; Wed, 24 Nov 2021 11:04:48 -0500 Received: from proxy11.mail.iad3b.rsapps.net ([172.31.255.6]) by director14.mail.ord1d.rsapps.net with LMTP id ELxZL6BinmFSZQAAeJ7fFg (envelope-from ) for ; Wed, 24 Nov 2021 11:04:48 -0500 Received: from smtp23.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy11.mail.iad3b.rsapps.net with LMTPS id aEj9KaBinmGdXgAARNREpw (envelope-from ) for ; Wed, 24 Nov 2021 11:04:48 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp23.gate.iad3b.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: 3f3a3b84-4d40-11ec-864c-525400aa5716-1-1 Received: from [216.105.38.7] ([216.105.38.7:37858] helo=lists.sourceforge.net) by smtp23.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 0E/38-27394-0A26E916; Wed, 24 Nov 2021 11:04:48 -0500 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.94.2) (envelope-from ) id 1mpukO-0003Ol-Fe; Wed, 24 Nov 2021 16:03:48 +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.94.2) (envelope-from ) id 1mpukL-0003Od-6y for openvpn-devel@lists.sourceforge.net; Wed, 24 Nov 2021 16:03:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding: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=kMBga64ShZsCSiWIDda84OV0+s6pdhfLPNT/vo6rwq8=; b=TKhctMFXeyw4CN7h8ZzdhK1PT/ Dbd0l87Wd318oSx67U4CRdYNU8Zf5A4FXFkAyU3cDSLJLQqIvbIy3xeXs60nBjdlKaFOYcWl3qluZ 10LFfA/ZhF+uvdfNYl8CvTXUV6RT4iFh+JfQxza/wLZ+0pUMd7Oimt6btY3gTMuj0d+k=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version: Content-Type:Content-Transfer-Encoding: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=kMBga64ShZsCSiWIDda84OV0+s6pdhfLPNT/vo6rwq8=; b=RHQQxPQI+eo7D9751yVZWDlNX4 9Xvt9HPcjVWMoMK3c3uJZaLg8x77G0zXr/bfb6DhqOg5SMfFwrqnexp/gR5V8Rk/SVWwt+TaJ0nvI ablrcvqeIdeZQpjDP+otNtaNgYdDIVG0iFs0TdPcPUyVeC7wSbwdyuAnZAbOxYgQFZMg=; Received: from mail-lj1-f176.google.com ([209.85.208.176]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) id 1mpukK-00063W-I1 for openvpn-devel@lists.sourceforge.net; Wed, 24 Nov 2021 16:03:45 +0000 Received: by mail-lj1-f176.google.com with SMTP id u22so6463564lju.7 for ; Wed, 24 Nov 2021 08:03:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=kMBga64ShZsCSiWIDda84OV0+s6pdhfLPNT/vo6rwq8=; b=LrY/LAhWKPqqwfo21Ww2bLUisNSvtk4gIEUQggqFe2J07uzukPQ037Ggw6KjmEGjt7 oYIWscrxsXG658nnN2Xz6cd6VpdQHDwjSAPZCWUoGn7TcOz/tyZu89Kaym4kRwQy+FcD mDdO4t/NDVgOmLOHOO31A5cYcBV1AZvHABGePtzxJREL0NKuHSEZ86QdfSdn/Kg2uyzA 2antRRMa+sHzCg7/nMd4L08DLmu8pRVdK0zIN6bL+ot5v8oWudrZTfQ/vUz4SvyXGEch vEjj0J0BcUhTM9aC3dQ61xciUR22YDCdloCukI4T5cnOnbVzm1tT3dEyqahYPSM/iHRw Na3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=kMBga64ShZsCSiWIDda84OV0+s6pdhfLPNT/vo6rwq8=; b=vHHWnJF0lRI9+dB0L8T6Ab1PMb2clcPgjogCuez3CrGt363oNEqoYpaqInEG8i3X3b h2Aan8LaJSsED1ozmPg+KJK0v4kL3XGpIDpKhlltZYt66M3Jxo3prmQDNaL3VToTl7M+ gqs9DJDXyrF8pQZhdrIg7koXXE98eznn18Exy1uF2qToH1etF/fQmdcXkWObUHXMIWjX 6JK3jSdiYZq2hoMk9Ei54MVGdtxaGtxLN1ASi9jr6WTttgEOtSVVs6lOCd16z6jfOlc8 sc6CKuniLpe1frWPn88ZBGWUAa5RdllSDUDbVURylAsKRWNWG/keg3fjR2Hkhn5KOGeZ Afqg== X-Gm-Message-State: AOAM530frTcpH4azvE2z5gS5CbrAY78rkjMEOjgspvK4Darr2JTw5QJK lKTujhwh1f+6z5c6Rg6nSHAELsIgC7M= X-Google-Smtp-Source: ABdhPJztVrxZxLV1QMeJlC0kk/lavDsp/dqR4MGey5Expa6E1LhRw5ZvHNOnzEvha+zByAxJ5p49NQ== X-Received: by 2002:a2e:bc21:: with SMTP id b33mr17877548ljf.497.1637769816241; Wed, 24 Nov 2021 08:03:36 -0800 (PST) Received: from LAPTOP-4L3N7KFS.localdomain (37-33-144-254.bb.dnainternet.fi. [37.33.144.254]) by smtp.gmail.com with ESMTPSA id n7sm22937ljg.113.2021.11.24.08.03.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 08:03:35 -0800 (PST) From: Lev Stipakov To: openvpn-devel@lists.sourceforge.net Date: Wed, 24 Nov 2021 18:03:47 +0200 Message-Id: <20211124160347.1245-1-lstipakov@gmail.com> X-Mailer: git-send-email 2.17.1 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 With register_ring_buffers() being declared as "static" in header file, all translation units, which include that header, got a copy of that function. This causes GCC warning warning: "register_ring_buffers" defined but not used [-Wunused-function] Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.176 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [lstipakov[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -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.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.176 listed in wl.mailspike.net] X-Headers-End: 1mpukK-00063W-I1 Subject: [Openvpn-devel] [PATCH] ring_buffer.h: fix GCC warning about unused function 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: Lev Stipakov MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Lev Stipakov With register_ring_buffers() being declared as "static" in header file, all translation units, which include that header, got a copy of that function. This causes GCC warning warning: "register_ring_buffers" defined but not used [-Wunused-function] when compiling C files which include header, but don't use function. Add "inline" keyword to silence this warning. Signed-off-by: Lev Stipakov Acked-by: Gert Doering --- src/openvpn/ring_buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/ring_buffer.h b/src/openvpn/ring_buffer.h index 77579e3f..9661ceb3 100644 --- a/src/openvpn/ring_buffer.h +++ b/src/openvpn/ring_buffer.h @@ -94,7 +94,7 @@ struct TUN_PACKET * that data has been written to receive ring * @return true if registration is successful, false otherwise - use GetLastError() */ -static bool +static inline bool register_ring_buffers(HANDLE device, struct tun_ring *send_ring, struct tun_ring *receive_ring,