Remove warnings

This commit is contained in:
Zhi Guan
2024-05-17 13:12:51 +08:00
parent 7cc5b77cf8
commit d56eeaac5a
15 changed files with 179 additions and 463 deletions

View File

@@ -87,7 +87,6 @@ static int test_sm4_cbc_test_vectors(void)
uint8_t *ciphertext;
size_t ciphertext_len;
uint8_t *encrypted;
size_t encrypted_len;
size_t i;
for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) {

View File

@@ -87,9 +87,7 @@ static int test_sm4_ctr_test_vectors(void)
SM4_KEY sm4_key;
uint8_t *encrypted;
size_t encrypted_len;
uint8_t *decrypted;
size_t decrypted_len;
size_t i;
for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) {

View File

@@ -192,7 +192,7 @@ static int speed_sm4_encrypt(void)
size_t nbytes = 16 * 1024 * 1024;
clock_t begin, end;
double seconds;
int i;
size_t i;
sm4_set_encrypt_key(&sm4_key, key);
for (i = 0; i < nbytes/sizeof(buf); i++) {