]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
route: Fix a unused-but-set-variable warning on OpenBSD
authorFrank Lichtenheld <frank@lichtenheld.com>
Sat, 4 Oct 2025 14:19:30 +0000 (16:19 +0200)
committerGert Doering <gert@greenie.muc.de>
Sat, 4 Oct 2025 16:03:48 +0000 (18:03 +0200)
So we could enable -Werror for OpenBSD builds.

Change-Id: Ic971604beb1320d7b9d6121cd8e8519ccc1a7eb9
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: MaxF <max@max-fillinger.net>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1214
Message-Id: <20251004141935.17815-1-gert@greenie.muc.de>
URL: https://sourceforge.net/p/openvpn/mailman/message/59242246/
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/route.c

index 156a99eb41d056d98038ff2d4ee37a1fc8e3d599..05a0c8f43dc3508b7798b15931128bfbcc9f2509 100644 (file)
@@ -2221,6 +2221,7 @@ delete_route_ipv6(const struct route_ipv6 *r6, const struct tuntap *tt, const st
         device = r6->iface;
         gateway_needed = true;
     }
+    (void)device; /* unused on some platforms */
 
     /* if we used a gateway on "add route", we also need to specify it on
      * delete, otherwise some OSes will refuse to delete the route