Fix some code maintenance issues
authorMatt Caswell <matt@openssl.org>
Fri, 15 Apr 2016 12:56:44 +0000 (13:56 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 21 Apr 2016 09:51:57 +0000 (10:51 +0100)
Various instances of variables being written to, but then never read.

Reviewed-by: Richard Levitte <levitte@openssl.org>
apps/enc.c
apps/errstr.c
apps/openssl.c
apps/ts.c
apps/x509.c
crypto/asn1/asn_mime.c

index 9e7d0692641e446102e532ab77a3ee1c7d3a6d86..1bdbf608c0813845e47c4835d48e2fdf1f1d5d0d 100644 (file)
@@ -292,7 +292,6 @@ int enc_main(int argc, char **argv)
         }
     }
     argc = opt_num_rest();
-    argv = opt_rest();
 
     if (cipher && EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) {
         BIO_printf(bio_err, "%s: AEAD ciphers not supported\n", prog);
index 141338adac4bd7c0966ec6247aa7f6ead1c9db1e..cd7f6c5e76eb4ec9ce5834cece7671c2bef46e80 100644 (file)
@@ -107,7 +107,6 @@ int errstr_main(int argc, char **argv)
         }
     }
     argc = opt_num_rest();
-    argv = opt_rest();
 
     ret = 0;
     for (argv = opt_rest(); *argv; argv++) {
index c8912eee5941d86af43ff574e2bc154e76a83d4c..e594bd1d237c41d851f50677ac5fcd71465d3ecd 100644 (file)
@@ -492,7 +492,6 @@ int help_main(int argc, char **argv)
         }
     }
     argc = opt_num_rest();
-    argv = opt_rest();
 
     if (argc != 0) {
         BIO_printf(bio_err, "Usage: %s\n", prog);
index 70a9013e2b6f3ac9ed7aa8b9f48a7081508e135a..ff4b25eef6d3188f4d7ac51ded4bd6628c584465 100644 (file)
--- a/apps/ts.c
+++ b/apps/ts.c
@@ -320,7 +320,6 @@ int ts_main(int argc, char **argv)
         }
     }
     argc = opt_num_rest();
-    argv = opt_rest();
     if (mode == OPT_ERR || argc != 0)
         goto opthelp;
 
index 6e6ee08ad29a1f30ccd14495ec162a401a63d257..6370116582e1074e7fa04584cff1dc2345873ac3 100644 (file)
@@ -763,7 +763,7 @@ int x509_main(int argc, char **argv)
                 BIO_printf(out, "/*\n"
                                 " * Subject: %s\n", buf);
 
-                m = X509_NAME_oneline(X509_get_issuer_name(x), buf, sizeof buf);
+                X509_NAME_oneline(X509_get_issuer_name(x), buf, sizeof buf);
                 BIO_printf(out, " * Issuer:  %s\n"
                                 " */\n", buf);
 
index 851fb91e8cb1f40c66491fd49b4c5b119d1347bf..7c10b5850f2d51ef767a68d1d73288c2e5246e15 100644 (file)
@@ -187,7 +187,7 @@ static ASN1_VALUE *b64_read_asn1(BIO *bio, const ASN1_ITEM *it)
     if (!val)
         ASN1err(ASN1_F_B64_READ_ASN1, ASN1_R_DECODE_ERROR);
     (void)BIO_flush(bio);
-    bio = BIO_pop(bio);
+    BIO_pop(bio);
     BIO_free(b64);
     return val;
 }