From: james Date: Tue, 27 Jan 2009 19:32:46 +0000 (+0000) Subject: Fixed some compile-time warnings. X-Git-Tag: v2.1_rc16~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b110c9c43940f7e314bcf9be02f6fdc22c81c560;p=thirdparty%2Fopenvpn.git Fixed some compile-time warnings. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3900 e7ae566f-a301-0410-adde-c780ea21d3b5 --- diff --git a/error.c b/error.c index 2cf8a148b..c72f5bc1a 100644 --- a/error.c +++ b/error.c @@ -577,7 +577,7 @@ x_check_status (int status, struct link_socket *sock, struct tuntap *tt) { - const int my_errno = (sock ? openvpn_errno_socket () : openvpn_errno ()); + const int my_errno = (sock ? openvpn_errno_socket () : (int)openvpn_errno ()); const char *extended_msg = NULL; msg (x_cs_verbose_level, "%s %s returned %d", diff --git a/ntlm.c b/ntlm.c index 1db4cc0ea..0453358cc 100644 --- a/ntlm.c +++ b/ntlm.c @@ -207,7 +207,7 @@ ntlm_phase_3 (const struct http_proxy_info *p, const char *phase_2, struct gc_ar char *ntlmv2_blob = ntlmv2_response + 16; /* inside ntlmv2_response, length: 128 */ int ntlmv2_blob_size=0; int phase3_bufpos = 0x40; /* offset to next security buffer data to be added */ - int len; + size_t len; char domain[128]; char username[128]; diff --git a/pkcs11.c b/pkcs11.c index b67a5d509..97ee7a65b 100644 --- a/pkcs11.c +++ b/pkcs11.c @@ -148,6 +148,8 @@ _pkcs11_openvpn_log ( va_list args ) { char Buffer[10*1024]; + + (void)global_data; vsnprintf (Buffer, sizeof (Buffer), szFormat, args); Buffer[sizeof (Buffer)-1] = 0; @@ -441,7 +443,7 @@ pkcs11_management_id_get ( #endif pkcs11h_certificate_t certificate = NULL; CK_RV rv = CKR_OK; - char *certificate_blob = NULL; + unsigned char *certificate_blob = NULL; size_t certificate_blob_size = 0; size_t max; char *internal_id = NULL; @@ -541,7 +543,7 @@ pkcs11_management_id_get ( goto cleanup; } - if ((certificate_blob = (char *)malloc (certificate_blob_size)) == NULL) { + if ((certificate_blob = (unsigned char *)malloc (certificate_blob_size)) == NULL) { msg (M_FATAL, "PKCS#11: Cannot allocate memory"); goto cleanup; } diff --git a/win32.h b/win32.h index eec090053..7066dceab 100644 --- a/win32.h +++ b/win32.h @@ -112,7 +112,7 @@ void net_event_win32_reset_write (struct net_event_win32 *ne); void net_event_win32_stop (struct net_event_win32 *ne); void net_event_win32_close (struct net_event_win32 *ne); -static bool +static inline bool net_event_win32_defined (const struct net_event_win32 *ne) { return defined_net_event_win32 (&ne->handle);