]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fixed some compile-time warnings.
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Tue, 27 Jan 2009 19:32:46 +0000 (19:32 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Tue, 27 Jan 2009 19:32:46 +0000 (19:32 +0000)
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3900 e7ae566f-a301-0410-adde-c780ea21d3b5

error.c
ntlm.c
pkcs11.c
win32.h

diff --git a/error.c b/error.c
index 2cf8a148b547b608c1aa09efb967bb7bd5e44a36..c72f5bc1a47282a605dc20424135884db8eee74e 100644 (file)
--- 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 1db4cc0ea87d576f96d728cf45bed92c8591b079..0453358cc22a8aade5e93f50109513b68f38cb3d 100644 (file)
--- 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];
index b67a5d5095e5f44189a9f698a42b4009deae33d8..97ee7a65b581cc691dbd7980928c813135392458 100644 (file)
--- 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 eec090053dc521e71285b440b2f71c22ba0ec2db..7066dceabbcb7501334d6885ee73332e0640de3f 100644 (file)
--- 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);