[Openvpn-devel,2/7] networking: silence warnings about unused arguments

Message ID 20220402070902.30282-3-a@unstable.cc
State Accepted
Headers show
Series Introduce ovpn-dco(-win) support | expand

Commit Message

Antonio Quartulli April 1, 2022, 8:08 p.m. UTC
In the net_ctx_init() stub definition, arguments are not used and
therefore they should be explicitly marked to avoid compiler
warnings.

Signed-off-by: Antonio Quartulli <a@unstable.cc>
---
 src/openvpn/networking.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Gert Doering April 3, 2022, 4:47 a.m. UTC | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

While my compiler (gcc 11.2.1) does not warn about them, having these (void) 
for two of the three functions and not all of them is at least slightly 
silly... so, yeah, why not.

Your patch has been applied to the master branch.

commit c3aa44699c69811493a81bda340a03530059929b
Author: Antonio Quartulli
Date:   Sat Apr 2 09:08:57 2022 +0200

     networking: silence warnings about unused arguments

     Signed-off-by: Antonio Quartulli <a@unstable.cc>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20220402070902.30282-3-a@unstable.cc>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24052.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/networking.h b/src/openvpn/networking.h
index 2cbf6163..9335701e 100644
--- a/src/openvpn/networking.h
+++ b/src/openvpn/networking.h
@@ -42,6 +42,9 @@  typedef void *openvpn_net_iface_t;
 static inline int
 net_ctx_init(struct context *c, openvpn_net_ctx_t *ctx)
 {
+    (void)c;
+    (void)ctx;
+
     return 0;
 }