Attention is currently required from: flichtenheld. Hello flichtenheld,
I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/894?usp=email to look at the new patch set (#4). Change subject: Fix warnings on Android about unused variables/methods ...................................................................... Fix warnings on Android about unused variables/methods The changes to route.c are a bit messy but they mostly modify already existing ifdefs Change-Id: I33d1d04b59c62e87ab61d768a7201124ccdabd07 Signed-off-by: Arne Schwabe <a...@rfc2549.org> --- M .github/workflows/build.yaml M src/openvpn/route.c M src/openvpn/tun.c 3 files changed, 14 insertions(+), 9 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/94/894/4 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b1af7ec..ce0fb74 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -61,7 +61,7 @@ - name: Install dependencies run: ${VCPKG_ROOT}/vcpkg install openssl lz4 cmocka - name: configure OpenVPN with cmake - run: cmake -S . -B openvpn-build -DUNSUPPORTED_BUILDS=yes -DCMAKE_SYSTEM_NAME=Android -DOPENSSL_ROOT_DIR=${VCPKG_INSTALLED_DIR}/${{ matrix.vcpkg_triplet }} -DENABLE_PKCS11=false -DBUILD_TESTING=true -DCMAKE_ANDROID_ARCH_ABI=${{ matrix.abi }} -DENABLE_LZO=false -DUSE_WERROR=no + run: cmake -S . -B openvpn-build -DUNSUPPORTED_BUILDS=yes -DCMAKE_SYSTEM_NAME=Android -DOPENSSL_ROOT_DIR=${VCPKG_INSTALLED_DIR}/${{ matrix.vcpkg_triplet }} -DENABLE_PKCS11=false -DBUILD_TESTING=true -DCMAKE_ANDROID_ARCH_ABI=${{ matrix.abi }} -DENABLE_LZO=false - name: Build OpenVPN Android binary with cmake run: cmake --build openvpn-build diff --git a/src/openvpn/route.c b/src/openvpn/route.c index d895e1c..1601275 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -104,6 +104,7 @@ #define RTA_SUCCESS 1 /* route addition succeeded */ #define RTA_EEXIST 2 /* route not added as it already exists */ +#ifndef TARGET_ANDROID static bool add_bypass_address(struct route_bypass *rb, const in_addr_t a) { @@ -125,6 +126,7 @@ return false; } } +#endif /* ifndef TARGET_ANDROID */ struct route_option_list * new_route_option_list(struct gc_arena *a) @@ -750,6 +752,7 @@ * (not the most beautiful implementation in the world, but portable and * "good enough") */ +#ifndef TARGET_ANDROID static bool route_ipv6_match_host( const struct route_ipv6 *r6, const struct in6_addr *host ) @@ -785,6 +788,7 @@ return false; } +#endif /* ifndef TARGET_ANDROID */ bool init_route_ipv6_list(struct route_ipv6_list *rl6, @@ -2183,7 +2187,7 @@ const struct env_set *es, openvpn_net_ctx_t *ctx) { -#if !defined(TARGET_LINUX) +#if !defined(TARGET_LINUX) && !defined(TARGET_ANDROID) const char *network; #if !defined(TARGET_AIX) const char *netmask; @@ -2191,9 +2195,11 @@ #if !defined(TARGET_ANDROID) const char *gateway; #endif -#else /* if !defined(TARGET_LINUX) */ +#else /* if !defined(TARGET_LINUX) && !defined(TARGET_ANDROID) */ +#if !defined(TARGET_ANDROID) int metric; #endif +#endif int is_local_route; if ((r->flags & (RT_DEFINED|RT_ADDED)) != (RT_DEFINED|RT_ADDED)) @@ -2204,7 +2210,7 @@ struct gc_arena gc = gc_new(); struct argv argv = argv_new(); -#if !defined(TARGET_LINUX) +#if !defined(TARGET_LINUX) && !defined(TARGET_ANDROID) network = print_in_addr_t(r->network, 0, &gc); #if !defined(TARGET_AIX) netmask = print_in_addr_t(r->netmask, 0, &gc); @@ -2394,10 +2400,10 @@ } #if !defined(_WIN32) -#if !defined(TARGET_LINUX) +#if !defined(TARGET_LINUX) && !defined(TARGET_ANDROID) const char *gateway; #endif -#if !defined(TARGET_SOLARIS) +#if !defined(TARGET_SOLARIS) && !defined(TARGET_ANDROID) bool gateway_needed = false; const char *device = tt->actual_name; if (r6->iface != NULL) /* vpn server special route */ @@ -2421,7 +2427,7 @@ struct argv argv = argv_new(); network = print_in6_addr( r6->network, 0, &gc); -#if !defined(TARGET_LINUX) && !defined(_WIN32) +#if !defined(TARGET_LINUX) && !defined(_WIN32) && !defined(TARGET_ANDROID) gateway = print_in6_addr( r6->gateway, 0, &gc); #endif diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 80f5dff..d2c5191 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -1888,7 +1888,7 @@ #endif -#if !(defined(_WIN32) || defined(TARGET_LINUX) || defined(TARGET_SOLARIS)) +#if !(defined(_WIN32) || defined(TARGET_LINUX) || defined(TARGET_SOLARIS) || defined(TARGET_ANDROID)) static void open_tun_generic(const char *dev, const char *dev_type, const char *dev_node, struct tuntap *tt) @@ -2062,7 +2062,6 @@ openvpn_net_ctx_t *ctx) { #define ANDROID_TUNNAME "vpnservice-tun" - struct user_pass up; struct gc_arena gc = gc_new(); bool opentun; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/894?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I33d1d04b59c62e87ab61d768a7201124ccdabd07 Gerrit-Change-Number: 894 Gerrit-PatchSet: 4 Gerrit-Owner: plaisthos <arne-open...@rfc2549.org> Gerrit-Reviewer: flichtenheld <fr...@lichtenheld.com> Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net> Gerrit-Attention: flichtenheld <fr...@lichtenheld.com> Gerrit-MessageType: newpatchset
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel