mirror of
https://github.com/OpenVPN/openvpn.git
synced 2025-05-12 06:44:35 +08:00
Fixed compiler warnings in Windows build (MinGW).
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3125 e7ae566f-a301-0410-adde-c780ea21d3b5
This commit is contained in:
parent
5a2e9a2587
commit
c373382c1e
4
buffer.c
4
buffer.c
@ -35,9 +35,9 @@
|
|||||||
size_t
|
size_t
|
||||||
array_mult_safe (const size_t m1, const size_t m2)
|
array_mult_safe (const size_t m1, const size_t m2)
|
||||||
{
|
{
|
||||||
const unsigned long long limit = 0xFFFFFFFF;
|
const size_t limit = 0xFFFFFFFF;
|
||||||
unsigned long long res = (unsigned long long)m1 * (unsigned long long)m2;
|
unsigned long long res = (unsigned long long)m1 * (unsigned long long)m2;
|
||||||
if (unlikely(m1 > limit) || unlikely(m2 > limit) || unlikely(res > limit))
|
if (unlikely(m1 > limit) || unlikely(m2 > limit) || unlikely(res > (unsigned long long)limit))
|
||||||
msg (M_FATAL, "attemped allocation of excessively large array");
|
msg (M_FATAL, "attemped allocation of excessively large array");
|
||||||
return (size_t) res;
|
return (size_t) res;
|
||||||
}
|
}
|
||||||
|
@ -369,7 +369,7 @@ int SSL_CTX_use_CryptoAPI_certificate(SSL_CTX *ssl_ctx, const char *cert_prop)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* cert_context->pbCertEncoded is the cert X509 DER encoded. */
|
/* cert_context->pbCertEncoded is the cert X509 DER encoded. */
|
||||||
cert = d2i_X509(NULL, (unsigned char **) &cd->cert_context->pbCertEncoded,
|
cert = d2i_X509(NULL, (const unsigned char **) &cd->cert_context->pbCertEncoded,
|
||||||
cd->cert_context->cbCertEncoded);
|
cd->cert_context->cbCertEncoded);
|
||||||
if (cert == NULL) {
|
if (cert == NULL) {
|
||||||
SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_FILE, ERR_R_ASN1_LIB);
|
SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_FILE, ERR_R_ASN1_LIB);
|
||||||
|
2
error.c
2
error.c
@ -78,7 +78,9 @@ static bool use_syslog; /* GLOBAL */
|
|||||||
static bool suppress_timestamps; /* GLOBAL */
|
static bool suppress_timestamps; /* GLOBAL */
|
||||||
|
|
||||||
/* The program name passed to syslog */
|
/* The program name passed to syslog */
|
||||||
|
#if SYSLOG_CAPABILITY
|
||||||
static char *pgmname_syslog; /* GLOBAL */
|
static char *pgmname_syslog; /* GLOBAL */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If non-null, messages should be written here (used for debugging only) */
|
/* If non-null, messages should be written here (used for debugging only) */
|
||||||
static FILE *msgfp; /* GLOBAL */
|
static FILE *msgfp; /* GLOBAL */
|
||||||
|
2
pkcs11.c
2
pkcs11.c
@ -436,7 +436,9 @@ pkcs11_management_id_get (
|
|||||||
) {
|
) {
|
||||||
pkcs11h_certificate_id_list_t id_list = NULL;
|
pkcs11h_certificate_id_list_t id_list = NULL;
|
||||||
pkcs11h_certificate_id_list_t entry = NULL;
|
pkcs11h_certificate_id_list_t entry = NULL;
|
||||||
|
#if 0 /* certificate_id seems to be unused -- JY */
|
||||||
pkcs11h_certificate_id_t certificate_id = NULL;
|
pkcs11h_certificate_id_t certificate_id = NULL;
|
||||||
|
#endif
|
||||||
pkcs11h_certificate_t certificate = NULL;
|
pkcs11h_certificate_t certificate = NULL;
|
||||||
CK_RV rv = CKR_OK;
|
CK_RV rv = CKR_OK;
|
||||||
char *certificate_blob = NULL;
|
char *certificate_blob = NULL;
|
||||||
|
2
route.c
2
route.c
@ -2041,7 +2041,7 @@ static void
|
|||||||
get_bypass_addresses (struct route_bypass *rb, const unsigned int flags)
|
get_bypass_addresses (struct route_bypass *rb, const unsigned int flags)
|
||||||
{
|
{
|
||||||
struct gc_arena gc = gc_new ();
|
struct gc_arena gc = gc_new ();
|
||||||
bool ret_bool = false;
|
/*bool ret_bool = false;*/
|
||||||
|
|
||||||
/* get full routing table */
|
/* get full routing table */
|
||||||
const MIB_IPFORWARDTABLE *routes = get_windows_routing_table (&gc);
|
const MIB_IPFORWARDTABLE *routes = get_windows_routing_table (&gc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user