]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
cleanup: remove C++ warnings
authorAlon Bar-Lev <alon.barlev@gmail.com>
Wed, 29 Feb 2012 20:11:34 +0000 (22:11 +0200)
committerDavid Sommerseth <davids@redhat.com>
Thu, 22 Mar 2012 21:06:52 +0000 (22:06 +0100)
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>
httpdigest.c
init.c
misc.c
options.c
socket.c
ssl_polarssl.c

index 5907637afe69222d8b730d441ec2fc976a288c48..1aa19ae2567f411152d8272505c4a0236c3952ea 100644 (file)
@@ -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 fb8fe00d559f792bf6adea446af611e42427ecd7..d2ad318dc2012bca9c9c2daf347602e3cca2a82c 100644 (file)
--- 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 a07780fcec8d1b0dea44ab0ba0b016cff7730c70..2a1c1c95ab59d636dd3590a4614c160695d44965 100644 (file)
--- 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);
index 3d8085c5427012d9964550315bd5c6c369feaf73..f11849da655416bd09fade8a1035d263ded84289 100644 (file)
--- 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]);
index 1a772afc97787471e947ebac691d2deede691c34..61265e4f6026bf9b98966dd06d0de482474e79eb 100644 (file)
--- 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) {
index c50cf0a35c06e7caa0ede8a58e824da4141092b5..02dc233976b2d99fd64f576363936b6774aec199 100644 (file)
@@ -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;
 }