aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-01-27 19:32:46 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-01-27 19:32:46 +0000
commitb110c9c43940f7e314bcf9be02f6fdc22c81c560 (patch)
treeff02bda67d63b83b1bb6f69a48e68bd2dd4f1a5e
parentFixed some issues with C++ style comments that leaked into the code. (diff)
downloadopenvpn-b110c9c43940f7e314bcf9be02f6fdc22c81c560.tar.xz
Fixed some compile-time warnings.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3900 e7ae566f-a301-0410-adde-c780ea21d3b5
-rw-r--r--error.c2
-rw-r--r--ntlm.c2
-rw-r--r--pkcs11.c6
-rw-r--r--win32.h2
4 files changed, 7 insertions, 5 deletions
diff --git a/error.c b/error.c
index 2cf8a14..c72f5bc 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 1db4cc0..0453358 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 b67a5d5..97ee7a6 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 eec0900..7066dce 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);