summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlon Bar-Lev <alon.barlev@gmail.com>2012-02-29 22:11:34 +0200
committerDavid Sommerseth <davids@redhat.com>2012-03-22 22:06:52 +0100
commitcc8dd14442ed10a2a7079d1707a045a33e451c13 (patch)
tree5b6d4f16965596daac9bf38cd8be37aef3543836
parent74b6d864453d757a59e7b33d0415a5af6da22d76 (diff)
downloadopenvpn-cc8dd14442ed10a2a7079d1707a045a33e451c13.tar.gz
openvpn-cc8dd14442ed10a2a7079d1707a045a33e451c13.tar.xz
openvpn-cc8dd14442ed10a2a7079d1707a045a33e451c13.zip
cleanup: remove C++ warnings
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Samuli Seppänen <samuli@openvpn.net> Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r--httpdigest.c4
-rw-r--r--init.c2
-rw-r--r--misc.c6
-rw-r--r--options.c4
-rw-r--r--socket.c4
-rw-r--r--ssl_polarssl.c6
6 files changed, 14 insertions, 12 deletions
diff --git a/httpdigest.c b/httpdigest.c
index 5907637..1aa19ae 100644
--- a/httpdigest.c
+++ b/httpdigest.c
@@ -111,7 +111,7 @@ DigestCalcResponse(
md_ctx_t md5_ctx;
const md_kt_t *md5_kt = md_kt_get("MD5");
- // calculate H(A2)
+ /* calculate H(A2) */
md_ctx_init(&md5_ctx, md5_kt);
md_ctx_update(&md5_ctx, pszMethod, strlen(pszMethod));
md_ctx_update(&md5_ctx, ":", 1);
@@ -124,7 +124,7 @@ DigestCalcResponse(
md_ctx_final(&md5_ctx, HA2);
CvtHex(HA2, HA2Hex);
- // calculate response
+ /* calculate response */
md_ctx_init(&md5_ctx, md5_kt);
md_ctx_update(&md5_ctx, HA1, HASHHEXLEN);
md_ctx_update(&md5_ctx, ":", 1);
diff --git a/init.c b/init.c
index fb8fe00..d2ad318 100644
--- a/init.c
+++ b/init.c
@@ -745,7 +745,7 @@ init_static (void)
uint8_t rndbuf[8];
int i;
prng_init ("sha1", 16);
- //prng_init (NULL, 0);
+ /*prng_init (NULL, 0);*/
const int factor = 1;
for (i = 0; i < factor * 8; ++i)
{
diff --git a/misc.c b/misc.c
index a07780f..2a1c1c9 100644
--- a/misc.c
+++ b/misc.c
@@ -2457,17 +2457,17 @@ argv_test (void)
argv_printf (&a, "%sc foo bar %s", "c:\\\\src\\\\test\\\\jyargs.exe", "foo bar");
argv_msg_prefix (M_INFO, &a, "ARGV");
msg (M_INFO, "ARGV-S: %s", argv_system_str(&a));
- //openvpn_execve_check (&a, NULL, 0, "command failed");
+ /*openvpn_execve_check (&a, NULL, 0, "command failed");*/
argv_printf (&a, "%sc %s %s", "c:\\\\src\\\\test files\\\\batargs.bat", "foo", "bar");
argv_msg_prefix (M_INFO, &a, "ARGV");
msg (M_INFO, "ARGV-S: %s", argv_system_str(&a));
- //openvpn_execve_check (&a, NULL, 0, "command failed");
+ /*openvpn_execve_check (&a, NULL, 0, "command failed");*/
argv_printf (&a, "%s%sc foo bar %s %s/%d %d %u", "/foo", "/bar.exe", "one two", "1.2.3.4", 24, -69, 96);
argv_msg_prefix (M_INFO, &a, "ARGV");
msg (M_INFO, "ARGV-S: %s", argv_system_str(&a));
- //openvpn_execve_check (&a, NULL, 0, "command failed");
+ /*openvpn_execve_check (&a, NULL, 0, "command failed");*/
argv_printf (&a, "this is a %s test of int %d unsigned %u", "FOO", -69, 42);
s = argv_str (&a, &gc, PA_BRACKET);
diff --git a/options.c b/options.c
index 3d8085c..f11849d 100644
--- a/options.c
+++ b/options.c
@@ -4764,7 +4764,7 @@ add_option (struct options *options,
}
else if (streq (p[0], "fragment") && p[1])
{
-// VERIFY_PERMISSION (OPT_P_MTU);
+/* VERIFY_PERMISSION (OPT_P_MTU); */
VERIFY_PERMISSION (OPT_P_MTU|OPT_P_CONNECTION);
options->ce.fragment = positive_atoi (p[1]);
}
@@ -5118,7 +5118,7 @@ add_option (struct options *options,
else if (streq (p[0], "explicit-exit-notify"))
{
VERIFY_PERMISSION (OPT_P_GENERAL|OPT_P_CONNECTION);
-// VERIFY_PERMISSION (OPT_P_EXPLICIT_NOTIFY);
+/* VERIFY_PERMISSION (OPT_P_EXPLICIT_NOTIFY); */
if (p[1])
{
options->ce.explicit_exit_notification = positive_atoi (p[1]);
diff --git a/socket.c b/socket.c
index 1a772af..61265e4 100644
--- a/socket.c
+++ b/socket.c
@@ -3106,7 +3106,7 @@ openvpn_inet_ntop(int af, const void *src, char *dst, socklen_t size)
default:
ASSERT (0);
}
- // cannot direclty use &size because of strict aliasing rules
+ /* cannot direclty use &size because of strict aliasing rules */
return (WSAAddressToString((struct sockaddr *)&ss, sizeof(ss), NULL, dst, &s) == 0)?
dst : NULL;
}
@@ -3119,7 +3119,7 @@ openvpn_inet_pton(int af, const char *src, void *dst)
char src_copy[INET6_ADDRSTRLEN+1];
CLEAR(ss);
- // stupid non-const API
+ /* stupid non-const API */
strncpynt(src_copy, src, INET6_ADDRSTRLEN+1);
if (WSAStringToAddress(src_copy, af, NULL, (struct sockaddr *)&ss, &size) == 0) {
diff --git a/ssl_polarssl.c b/ssl_polarssl.c
index c50cf0a..02dc233 100644
--- a/ssl_polarssl.c
+++ b/ssl_polarssl.c
@@ -324,8 +324,10 @@ tls_ctx_load_priv_file (struct tls_root_ctx *ctx, const char *priv_key_file
warn_if_group_others_accessible (priv_key_file);
/* TODO: Check Private Key */
-// if (!SSL_CTX_check_private_key (ctx))
-// msg (M_SSLERR, "Private key does not match the certificate");
+#if 0
+ if (!SSL_CTX_check_private_key (ctx))
+ msg (M_SSLERR, "Private key does not match the certificate");
+#endif
return 0;
}