]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
PATCHv3 Remove unused variables or put them to the defines they are being used in
authorArne Schwabe <arne@rfc2549.org>
Mon, 15 Apr 2013 21:06:39 +0000 (23:06 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 20 Jun 2013 18:44:24 +0000 (20:44 +0200)
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1366059999-31731-1-git-send-email-arne@rfc2549.org>
URL: http://article.gmane.org/gmane.network.openvpn.devel/7511

Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/crypto.c
src/openvpn/init.c
src/openvpn/misc.c
src/openvpn/proxy.c
src/openvpn/route.c
src/openvpn/ssl.c
src/openvpn/ssl_openssl.c
src/openvpn/ssl_verify.c

index d9adf5b51304cd7611c7bfc8d69d6f6447555476..c4c356dc4326cbe5f374822d910f587266bfcf0a 100644 (file)
@@ -1028,7 +1028,6 @@ read_passphrase_hash (const char *passphrase_file,
                      uint8_t *output,
                      int len)
 {
-  unsigned int outlen = 0;
   md_ctx_t md;
 
   ASSERT (len >= md_kt_size(digest));
@@ -1361,7 +1360,6 @@ prng_bytes (uint8_t *output, int len)
       const int md_size = md_kt_size (nonce_md);
       while (len > 0)
        {
-         unsigned int outlen = 0;
          const int blen = min_int (len, md_size);
          md_full(nonce_md, nonce_data, md_size + nonce_secret_len, nonce_data);
          memcpy (output, nonce_data, blen);
index cf0498d4f26568b1c805d5da1e55f736f439c78a..fb1472697147148fcbc6b9d582c59884c3bca0de 100644 (file)
@@ -1205,7 +1205,6 @@ do_init_route_ipv6_list (const struct options *options,
                    struct env_set *es)
 {
   const char *gw = NULL;
-  int dev = dev_type_enum (options->dev, options->dev_type);
   int metric = -1;             /* no metric set */
 
   gw = options->ifconfig_ipv6_remote;          /* default GW = remote end */
index fa327f8c7315216308b6d93f55e4103444f7f82d..1120adc435eba2778280c48539e44f701b9e5247 100644 (file)
@@ -701,14 +701,6 @@ env_set_remove_from_environment (const struct env_set *es)
     }
 }
 
-#ifdef HAVE_PUTENV
-
-/* companion functions to putenv */
-
-static struct env_item *global_env = NULL; /* GLOBAL */
-
-#endif
-
 /* add/modify/delete environmental strings */
 
 void
index 95d71531bc2ffbbfd096da669e8ff931b6d333eb..04ed421b3d85202642f62281fdaa6da442ab1b6e 100644 (file)
@@ -439,7 +439,6 @@ struct http_proxy_info *
 http_proxy_new (const struct http_proxy_options *o)
 {
   struct http_proxy_info *p;
-  struct http_proxy_options opt;
 
   if (!o || !o->server)
     msg (M_FATAL, "HTTP_PROXY: server not specified");
index 72ecbaf88aef49be2aec876ade08bfbe3e49ab35..19b4bfe1d6b26cf2d0cf4ca872e6e2a5fb28437d 100644 (file)
@@ -2881,7 +2881,6 @@ get_default_gateway (struct route_gateway_info *rgi)
        {
          /* get interface name */
          const struct sockaddr_dl *adl = (struct sockaddr_dl *) ifp;
-         int len = adl->sdl_nlen;
          if (adl->sdl_nlen && adl->sdl_nlen < sizeof(rgi->iface))
            {
              memcpy (rgi->iface, adl->sdl_data, adl->sdl_nlen);
index d9076f36e63d52b142bd268dc43acdbcacc0c587..736dfc95d6e425dd196292ee956759169e4a727d 100644 (file)
@@ -1734,7 +1734,6 @@ key_method_1_write (struct buffer *buf, struct tls_session *session)
 {
   struct key key;
   struct key_state *ks = &session->key[KS_PRIMARY];       /* primary key */
-  struct key_state *ks_lame = &session->key[KS_LAME_DUCK]; /* retiring key */
 
   ASSERT (session->opt->key_method == 1);
   ASSERT (buf_init (buf, 0));
@@ -1849,7 +1848,6 @@ static bool
 key_method_2_write (struct buffer *buf, struct tls_session *session)
 {
   struct key_state *ks = &session->key[KS_PRIMARY];       /* primary key */
-  struct key_state *ks_lame = &session->key[KS_LAME_DUCK]; /* retiring key */
 
   ASSERT (session->opt->key_method == 2);
   ASSERT (buf_init (buf, 0));
@@ -1933,7 +1931,6 @@ key_method_1_read (struct buffer *buf, struct tls_session *session)
   int status;
   struct key key;
   struct key_state *ks = &session->key[KS_PRIMARY];       /* primary key */
-  struct key_state *ks_lame = &session->key[KS_LAME_DUCK]; /* retiring key */
 
   ASSERT (session->opt->key_method == 1);
 
@@ -1992,7 +1989,6 @@ static bool
 key_method_2_read (struct buffer *buf, struct tls_multi *multi, struct tls_session *session)
 {
   struct key_state *ks = &session->key[KS_PRIMARY];       /* primary key */
-  struct key_state *ks_lame = &session->key[KS_LAME_DUCK]; /* retiring key */
 
   int key_method_flags;
   bool username_status, password_status;
index 2e5933d610810e00825aca649f539cc065ea52e9..5db717df345ab6d616f75bce65284dd43940975e 100644 (file)
@@ -490,7 +490,6 @@ tls_ctx_load_priv_file (struct tls_root_ctx *ctx, const char *priv_key_file,
     const char *priv_key_file_inline
     )
 {
-  int status;
   SSL_CTX *ssl_ctx = NULL;
   BIO *in = NULL;
   EVP_PKEY *pkey = NULL;
@@ -1193,7 +1192,6 @@ show_available_tls_ciphers ()
   SSL_CTX *ctx;
   SSL *ssl;
   const char *cipher_name;
-  const char *print_name;
   const tls_cipher_name_pair *pair;
   int priority = 0;
 
index e651a8e0f52f76ad50e6190066d13f2ec307d942..b1bbc96f1dcf6a20b44781f81f7ca9ef75989f27 100644 (file)
@@ -1027,7 +1027,9 @@ static int
 verify_user_pass_plugin (struct tls_session *session, const struct user_pass *up, const char *raw_username)
 {
   int retval = OPENVPN_PLUGIN_FUNC_ERROR;
+#ifdef PLUGIN_DEF_AUTH
   struct key_state *ks = &session->key[KS_PRIMARY];       /* primary key */
+#endif
 
   /* Is username defined? */
   if ((session->opt->ssl_flags & SSLF_AUTH_USER_PASS_OPTIONAL) || strlen (up->username))