From ffcc66bb53547317225e8ba5be34688232c05c01 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Fri, 31 Mar 2023 11:48:18 +0200 Subject: [PATCH] Add explicit casts --- wolfcrypt/test/test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 6fe6803a5..9be50774e 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -7481,15 +7481,15 @@ WOLFSSL_TEST_SUBROUTINE int des3_test(void) /* Use i as the splitter */ XMEMCPY(iv4, iv3, sizeof(DES_cblock)); - DES_ede3_cbc_encrypt(vector, cipher, i, &ks1, &ks2, &ks3, + DES_ede3_cbc_encrypt(vector, cipher, (long)i, &ks1, &ks2, &ks3, &iv4, DES_ENCRYPT); - DES_ede3_cbc_encrypt(vector + i, cipher + i, sizeof(vector) - i, &ks1, - &ks2, &ks3, &iv4, DES_ENCRYPT); + DES_ede3_cbc_encrypt(vector + i, cipher + i, (long)(sizeof(vector) - i), + &ks1, &ks2, &ks3, &iv4, DES_ENCRYPT); XMEMCPY(iv4, iv3, sizeof(DES_cblock)); - DES_ede3_cbc_encrypt(cipher, plain, i, &ks1, &ks2, &ks3, + DES_ede3_cbc_encrypt(cipher, plain, (long)i, &ks1, &ks2, &ks3, &iv4, DES_DECRYPT); - DES_ede3_cbc_encrypt(cipher + i, plain + i, sizeof(cipher) - i, &ks1, - &ks2, &ks3, &iv4, DES_DECRYPT); + DES_ede3_cbc_encrypt(cipher + i, plain + i, (long)(sizeof(cipher) - i), + &ks1, &ks2, &ks3, &iv4, DES_DECRYPT); if (XMEMCMP(plain, vector, sizeof(plain))) return WC_TEST_RET_ENC_NC;