@@ -15,7 +15,6 @@
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <MinimalRebuild>true</MinimalRebuild>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
@@ -109,9 +109,6 @@ DEFINE_GUID(
static WCHAR *FIREWALL_NAME = L"OpenVPN";
-VOID NETIOAPI_API_
-InitializeIpInterfaceEntry(PMIB_IPINTERFACE_ROW Row);
-
/*
* Default msg handler does nothing
*/
@@ -474,7 +474,7 @@ x_gc_freespecial(struct gc_arena *a)
}
void
-gc_addspecial(void *addr, void (free_function)(void *), struct gc_arena *a)
+gc_addspecial(void *addr, void (*free_function)(void *), struct gc_arena *a)
{
ASSERT(a);
struct gc_entry_special *e;
@@ -313,7 +313,7 @@ show_available_ciphers(void)
}
}
- qsort(cipher_list, num_ciphers, sizeof(*cipher_list), cipher_name_cmp);
+ qsort((void *)cipher_list, num_ciphers, sizeof(*cipher_list), cipher_name_cmp);
for (i = 0; i < num_ciphers; i++)
{
@@ -1778,7 +1778,7 @@ do_open_tun(struct context *c)
#ifdef _WIN32
/* store (hide) interactive service handle in tuntap_options */
c->c1.tuntap->options.msg_channel = c->options.msg_channel;
- msg(D_ROUTE, "interactive service msg_channel=%u", (unsigned int) c->options.msg_channel);
+ msg(D_ROUTE, "interactive service msg_channel=%llu", (unsigned long long) c->options.msg_channel);
#endif
/* allocate route list structure */
@@ -175,7 +175,7 @@ set_mtu_discover_type(int sd, int mtu_type, sa_family_t proto_af)
#if defined(HAVE_SETSOCKOPT) && defined(IP_MTU_DISCOVER)
case AF_INET:
if (setsockopt
- (sd, IPPROTO_IP, IP_MTU_DISCOVER, &mtu_type, sizeof(mtu_type)))
+ (sd, IPPROTO_IP, IP_MTU_DISCOVER, (const char *)&mtu_type, sizeof(mtu_type)))
{
msg(M_ERR, "Error setting IP_MTU_DISCOVER type=%d on TCP/UDP socket",
mtu_type);
@@ -186,7 +186,7 @@ set_mtu_discover_type(int sd, int mtu_type, sa_family_t proto_af)
#if defined(HAVE_SETSOCKOPT) && defined(IPV6_MTU_DISCOVER)
case AF_INET6:
if (setsockopt
- (sd, IPPROTO_IPV6, IPV6_MTU_DISCOVER, &mtu_type, sizeof(mtu_type)))
+ (sd, IPPROTO_IPV6, IPV6_MTU_DISCOVER, (const char *)&mtu_type, sizeof(mtu_type)))
{
msg(M_ERR, "Error setting IPV6_MTU_DISCOVER type=%d on TCP6/UDP6 socket",
mtu_type);
@@ -28,23 +28,19 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -74,7 +70,8 @@
<ClCompile>
<AdditionalIncludeDirectories>..\compat;$(TAP_WINDOWS_HOME)/include;$(OPENSSL_HOME)/include;$(LZO_HOME)/include;$(PKCS11H_HOME)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <UndefinePreprocessorDefinitions>UNICODE;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
+ <UndefinePreprocessorDefinitions>%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
+ <WarningLevel>Level2</WarningLevel>
</ClCompile>
<ResourceCompile />
<Link>
@@ -87,7 +84,8 @@
<ClCompile>
<AdditionalIncludeDirectories>..\compat;$(TAP_WINDOWS_HOME)/include;$(OPENSSL_HOME)/include;$(LZO_HOME)/include;$(PKCS11H_HOME)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <UndefinePreprocessorDefinitions>UNICODE;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
+ <UndefinePreprocessorDefinitions>%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
+ <WarningLevel>Level2</WarningLevel>
</ClCompile>
<ResourceCompile />
<Link>
@@ -100,7 +98,8 @@
<ClCompile>
<AdditionalIncludeDirectories>..\compat;$(TAP_WINDOWS_HOME)/include;$(OPENSSL_HOME)/include;$(LZO_HOME)/include;$(PKCS11H_HOME)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <UndefinePreprocessorDefinitions>UNICODE;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
+ <UndefinePreprocessorDefinitions>%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
+ <WarningLevel>Level2</WarningLevel>
</ClCompile>
<ResourceCompile />
<Link>
@@ -113,7 +112,8 @@
<ClCompile>
<AdditionalIncludeDirectories>..\compat;$(TAP_WINDOWS_HOME)/include;$(OPENSSL_HOME)/include;$(LZO_HOME)/include;$(PKCS11H_HOME)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <UndefinePreprocessorDefinitions>UNICODE;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
+ <UndefinePreprocessorDefinitions>%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
+ <WarningLevel>Level2</WarningLevel>
</ClCompile>
<ResourceCompile />
<Link>
@@ -303,4 +303,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
@@ -7172,7 +7172,7 @@ add_option(struct options *options,
#ifdef _WIN32
VERIFY_PERMISSION(OPT_P_GENERAL);
HANDLE process = GetCurrentProcess();
- HANDLE handle = (HANDLE) atoi(p[1]);
+ HANDLE handle = (HANDLE) atoll(p[1]);
if (!DuplicateHandle(process, handle, process, &options->msg_channel, 0,
FALSE, DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS))
{
@@ -2825,7 +2825,7 @@ get_default_gateway_ipv6(struct route_ipv6_gateway_info *rgi6,
DestinationAddress.Ipv6.sin6_addr = *dest;
}
- status = GetBestInterfaceEx( &DestinationAddress, &BestIfIndex );
+ status = GetBestInterfaceEx((struct sockaddr *)&DestinationAddress, &BestIfIndex );
if (status != NO_ERROR)
{
@@ -529,7 +529,7 @@ void print_details(struct key_state_ssl *ks_ssl, const char *prefix);
void
show_available_tls_ciphers_list(const char *cipher_list,
const char *tls_cert_profile,
- bool tls13);
+ const bool tls13);
/*
* Show the available elliptic curves in the crypto library
@@ -4613,7 +4613,7 @@ static DWORD
get_adapter_index_method_1(const char *guid)
{
DWORD index;
- ULONG aindex;
+ ULONG aindex = 0;
wchar_t wbuf[256];
openvpn_swprintf(wbuf, SIZE(wbuf), L"\\DEVICE\\TCPIP_%S", guid);
if (GetAdapterIndex(wbuf, &aindex) != NO_ERROR)
@@ -5868,7 +5868,7 @@ open_tun(const char *dev, const char *dev_type, const char *dev_node, struct tun
/* get driver MTU */
if (!tt->wintun)
{
- ULONG mtu;
+ ULONG mtu = 0;
if (DeviceIoControl(tt->hand, TAP_WIN_IOCTL_GET_MTU,
&mtu, sizeof(mtu),
&mtu, sizeof(mtu), &len, NULL))