]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix signed/unsigned comparison warnings in sslapitest
authorMatt Caswell <matt@openssl.org>
Wed, 14 Jul 2021 14:36:12 +0000 (15:36 +0100)
committerPauli <pauli@openssl.org>
Sat, 17 Jul 2021 07:52:48 +0000 (17:52 +1000)
Fixes build failures if using enable-ktls in conjunction with --strict-warnings

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16090)

test/sslapitest.c

index 49f7ef639dfea933c48396a66a7acbf3a40f27a7..cc11eebc5459060f38aabd33e8e79d9d1b7a33d9 100644 (file)
@@ -1436,7 +1436,7 @@ static int test_ktls(int test)
     struct ktls_test_cipher *cipher;
     int cis_ktls, sis_ktls;
 
-    OPENSSL_assert(test / 4 < NUM_KTLS_TEST_CIPHERS);
+    OPENSSL_assert(test / 4 < (int)NUM_KTLS_TEST_CIPHERS);
     cipher = &ktls_test_ciphers[test / 4];
 
     cis_ktls = (test & 1) != 0;
@@ -1450,7 +1450,7 @@ static int test_ktls_sendfile(int tst)
 {
     struct ktls_test_cipher *cipher;
 
-    OPENSSL_assert(tst < NUM_KTLS_TEST_CIPHERS);
+    OPENSSL_assert(tst < (int)NUM_KTLS_TEST_CIPHERS);
     cipher = &ktls_test_ciphers[tst];
 
     return execute_test_ktls_sendfile(cipher->tls_version, cipher->cipher);