A bunch of dead assignments.
Caught by clang scan-build.
Change-Id: I4f10c879dc137d4a14a7a395764d28e5caa033ff
Reviewed-on: https://boringssl-review.googlesource.com/1342
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/bn/convert.c b/crypto/bn/convert.c
index 9befc49..048ac73 100644
--- a/crypto/bn/convert.c
+++ b/crypto/bn/convert.c
@@ -232,7 +232,6 @@
BN_ULONG l=0;
j = i; /* least significant 'hex' */
- m = 0;
h = 0;
while (j > 0) {
m = ((BN_BYTES * 2) <= j) ? (BN_BYTES * 2) : j;
@@ -383,7 +382,6 @@
*p++ = '-';
}
- i = 0;
while (!BN_is_zero(t)) {
*lp = BN_div_word(t, BN_DEC_CONV);
lp++;
diff --git a/crypto/bn/exponentiation.c b/crypto/bn/exponentiation.c
index 0c9d7a7..69c2f90 100644
--- a/crypto/bn/exponentiation.c
+++ b/crypto/bn/exponentiation.c
@@ -509,7 +509,6 @@
* how bit a window to do. To do this we need to scan
* forward until the last set bit before the end of the
* window */
- j = wstart;
wvalue = 1;
wend = 0;
for (i = 1; i < window; i++) {
diff --git a/crypto/des/des.c b/crypto/des/des.c
index ca87ee3..6d00011 100644
--- a/crypto/des/des.c
+++ b/crypto/des/des.c
@@ -413,7 +413,6 @@
FP(r, l);
data[0] = l;
data[1] = r;
- l = r = t = u = 0;
}
static void DES_encrypt2(uint32_t *data, const DES_key_schedule *ks, int enc) {
@@ -473,7 +472,6 @@
/* rotate and clear the top bits on machines with 8byte longs */
data[0] = ROTATE(l, 3) & 0xffffffffL;
data[1] = ROTATE(r, 3) & 0xffffffffL;
- l = r = t = u = 0;
}
static void DES_encrypt3(uint32_t *data, const DES_key_schedule *ks1,
@@ -532,7 +530,7 @@
l2c(l, out);
l = ll[1];
l2c(l, out);
- l = ll[0] = ll[1] = 0;
+ ll[0] = ll[1] = 0;
}
void DES_ncbc_encrypt(const uint8_t *in, uint8_t *out, size_t len,
@@ -608,7 +606,6 @@
l2c(xor0, iv);
l2c(xor1, iv);
}
- tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
tin[0] = tin[1] = 0;
}
@@ -709,6 +706,5 @@
l2c(xor1, iv);
}
- tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
tin[0] = tin[1] = 0;
}
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
index 13e3ae5..b61568a 100644
--- a/ssl/s3_clnt.c
+++ b/ssl/s3_clnt.c
@@ -2701,8 +2701,7 @@
{
/* If we get an error, we need to
* ssl->rwstate=SSL_X509_LOOKUP; return(-1);
- * We then get retied later */
- i=0;
+ * We then get retried later */
i = ssl_do_client_cert_cb(s, &x509, &pkey);
if (i < 0)
{