>> #ifndef _WIN32 >> + const char *device = tt->actual_name; > > This variable is not used in all cases embraced by "ifndef _WIN32". > I.e. I think it is not used when any of the following is defined: > TARGET_OPENBSD > TARGET_NETBSD > TARGET_AIX > > Therefore this change would fix *only* the warning on Windows. > Do we want to go this way? or should we rather rearrange the ifdefs a > bit so that we have a cleaner change/function?
No all other platforms. The variable is used just 2 lines below it definition to set gateway_needed which is used by all platforms apart from _WIN32. So only WIN32 had this warning. > > > >> if (r6->iface != NULL) /* vpn server special route */ >> { >> device = r6->iface; >> @@ -2713,7 +2713,7 @@ get_default_gateway_row(const MIB_IPFORWARDTABLE >> *routes) >> const DWORD index = row->dwForwardIfIndex; >> const DWORD metric = row->dwForwardMetric1; >> >> - dmsg(D_ROUTE_DEBUG, "GDGR: route[%d] %s/%s i=%d m=%d", >> + dmsg(D_ROUTE_DEBUG, "GDGR: route[%lu] %s/%s i=%d m=%d", > > shouldn't be enough to convert to %u ? (/me is not a DOWRD expert though) No. DWORD is a long unsigned int as mentioned in the commit message. It is 32 bit int since Windows always has long as 32 bit. It is a bit confusing when you are used to the long=64 bit :) >> index 2c1b270dd..4ef34e4eb 100644 >> --- a/src/openvpn/tun.c >> +++ b/src/openvpn/tun.c >> @@ -5606,7 +5606,7 @@ windows_set_mtu(const int iface_index, const short >> family, >> >> if (err != NO_ERROR) >> { >> - msg(M_WARN, "TUN: Setting %s mtu failed: %s [status=%u >> if_index=%d]", >> + msg(M_WARN, "TUN: Setting %s mtu failed: %s [status=%lu >> if_index=%d]", > > same question as above. > Same answer :) Arne _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel