1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
From c31ba5b149428cbbcd48fab649331a2d38003209 Mon Sep 17 00:00:00 2001
From: Cristian Stoica <cristian.stoica@nxp.com>
Date: Wed, 26 Oct 2016 10:47:07 +0300
Subject: [PATCH 064/104] remove not used local variables
Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
---
tests/async_hmac.c | 2 --
tests/async_speed.c | 5 -----
tests/cipher_comp.c | 2 +-
tests/hash_comp.c | 5 ++---
tests/hmac.c | 2 --
tests/sha_speed.c | 1 -
6 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/tests/async_hmac.c b/tests/async_hmac.c
index 94a02c0..85d19c6 100644
--- a/tests/async_hmac.c
+++ b/tests/async_hmac.c
@@ -185,8 +185,6 @@ test_extras(int cfd)
struct session_op sess;
struct crypt_op cryp;
uint8_t mac[AALG_MAX_RESULT_LEN];
- uint8_t oldmac[AALG_MAX_RESULT_LEN];
- uint8_t md5_hmac_out[] = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7\x38";
uint8_t sha1_out[] = "\x8f\x82\x03\x94\xf9\x53\x35\x18\x20\x45\xda\x24\xf3\x4d\xe5\x2b\xf8\xbc\x34\x32";
int i;
diff --git a/tests/async_speed.c b/tests/async_speed.c
index dabbbc1..f2b9772 100644
--- a/tests/async_speed.c
+++ b/tests/async_speed.c
@@ -284,8 +284,6 @@ int run_null(int fdc, struct test_params tp)
{
struct session_op sess;
char keybuf[32];
- int alignmask;
- int i;
fprintf(stderr, "Testing NULL cipher: \n");
memset(&sess, 0, sizeof(sess));
@@ -305,8 +303,6 @@ int run_aes_128_cbc(int fdc, struct test_params tp)
{
struct session_op sess;
char keybuf[32];
- int alignmask;
- int i;
memset(&sess, 0, sizeof(sess));
sess.cipher = CRYPTO_AES_CBC;
@@ -390,7 +386,6 @@ int main(int argc, char **argv)
{
int i;
int c;
- int index;
bool alg_flag;
char *alg_name;
struct test_params tp;
diff --git a/tests/cipher_comp.c b/tests/cipher_comp.c
index 03f67bf..dbf9977 100644
--- a/tests/cipher_comp.c
+++ b/tests/cipher_comp.c
@@ -33,7 +33,7 @@ test_crypto(int cfd, struct session_op *sess, int datalen)
struct crypt_op cryp;
- int ret = 0, fail = 0;
+ int ret = 0;
data = malloc(datalen);
encrypted = malloc(datalen);
diff --git a/tests/hash_comp.c b/tests/hash_comp.c
index e6a4346..73f85ed 100644
--- a/tests/hash_comp.c
+++ b/tests/hash_comp.c
@@ -36,7 +36,7 @@ test_crypto(int cfd, struct session_op *sess, int datalen)
struct crypt_op cryp;
- int ret = 0, fail = 0;
+ int ret = 0;
data = malloc(datalen);
memset(data, datalen & 0xff, datalen);
@@ -66,7 +66,7 @@ test_crypto(int cfd, struct session_op *sess, int datalen)
if (memcmp(mac, mac_comp, AALG_MAX_RESULT_LEN)) {
printf("fail for datalen %d, MACs do not match!\n", datalen);
- fail = 1;
+ ret = 1;
printf("wrong mac: ");
printhex(mac, 20);
printf("right mac: ");
@@ -88,7 +88,6 @@ main(int argc, char **argv)
struct session_op sess;
int datalen = BLOCK_SIZE;
int datalen_end = MAX_DATALEN;
- int i;
if (argc > 1) {
datalen = min(max(atoi(argv[1]), BLOCK_SIZE), MAX_DATALEN);
diff --git a/tests/hmac.c b/tests/hmac.c
index 80a2c42..3b248f3 100644
--- a/tests/hmac.c
+++ b/tests/hmac.c
@@ -212,8 +212,6 @@ test_extras(int cfd)
#endif
struct crypt_op cryp;
uint8_t mac[AALG_MAX_RESULT_LEN];
- uint8_t oldmac[AALG_MAX_RESULT_LEN];
- uint8_t md5_hmac_out[] = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7\x38";
uint8_t sha1_out[] = "\x8f\x82\x03\x94\xf9\x53\x35\x18\x20\x45\xda\x24\xf3\x4d\xe5\x2b\xf8\xbc\x34\x32";
int i;
diff --git a/tests/sha_speed.c b/tests/sha_speed.c
index e5c6efe..9f2c8cc 100644
--- a/tests/sha_speed.c
+++ b/tests/sha_speed.c
@@ -296,7 +296,6 @@ int main(void)
int fd;
int fdc;
int err;
- int i;
struct session_op sess;
signal(SIGALRM, alarm_handler);
--
2.10.2
|