src/internal.c, tests/api.c: add missing casts for C++ compatibility (fixes "invalid conversion" errors).

This commit is contained in:
Daniel Pouzzner
2025-04-11 09:33:20 -05:00
parent cfd93b1bd4
commit 29dcf42309
2 changed files with 3 additions and 3 deletions

View File

@ -42369,7 +42369,7 @@ WOLFSSL_BY_DIR_HASH* wolfSSL_sk_BY_DIR_HASH_value(
WOLFSSL_BY_DIR_HASH* wolfSSL_sk_BY_DIR_HASH_pop(
WOLF_STACK_OF(WOLFSSL_BY_DIR_HASH)* sk)
{
return wolfSSL_sk_pop(sk);
return (WOLFSSL_BY_DIR_HASH *)wolfSSL_sk_pop(sk);
}
/* release all contents in stack, and then release stack itself. */
/* Second argument is a function pointer to release resources. */
@ -42501,7 +42501,7 @@ WOLFSSL_BY_DIR_entry* wolfSSL_sk_BY_DIR_entry_value(
WOLFSSL_BY_DIR_entry* wolfSSL_sk_BY_DIR_entry_pop(
WOLF_STACK_OF(WOLFSSL_BY_DIR_entry)* sk)
{
return wolfSSL_sk_pop(sk);
return (WOLFSSL_BY_DIR_entry *)wolfSSL_sk_pop(sk);
}
/* release all contents in stack, and then release stack itself. */
/* Second argument is a function pointer to release resources. */

View File

@ -33034,7 +33034,7 @@ static int test_wolfSSL_PKCS8_d2i(void)
bio = NULL;
/* https://github.com/wolfSSL/wolfssl/issues/8610 */
bytes = (int)XSTRLEN((void*)pkcs8_buffer);
bytes = (int)XSTRLEN((char *)pkcs8_buffer);
ExpectNotNull(bio = BIO_new_mem_buf((void*)pkcs8_buffer, bytes));
ExpectIntEQ(BIO_get_mem_data(bio, &p), bytes);
ExpectIntEQ(XMEMCMP(p, pkcs8_buffer, bytes), 0);