Skip to content

Commit 29dcf42

Browse files
committed
src/internal.c, tests/api.c: add missing casts for C++ compatibility (fixes "invalid conversion" errors).
1 parent cfd93b1 commit 29dcf42

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/internal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42369,7 +42369,7 @@ WOLFSSL_BY_DIR_HASH* wolfSSL_sk_BY_DIR_HASH_value(
4236942369
WOLFSSL_BY_DIR_HASH* wolfSSL_sk_BY_DIR_HASH_pop(
4237042370
WOLF_STACK_OF(WOLFSSL_BY_DIR_HASH)* sk)
4237142371
{
42372-
return wolfSSL_sk_pop(sk);
42372+
return (WOLFSSL_BY_DIR_HASH *)wolfSSL_sk_pop(sk);
4237342373
}
4237442374
/* release all contents in stack, and then release stack itself. */
4237542375
/* Second argument is a function pointer to release resources. */
@@ -42501,7 +42501,7 @@ WOLFSSL_BY_DIR_entry* wolfSSL_sk_BY_DIR_entry_value(
4250142501
WOLFSSL_BY_DIR_entry* wolfSSL_sk_BY_DIR_entry_pop(
4250242502
WOLF_STACK_OF(WOLFSSL_BY_DIR_entry)* sk)
4250342503
{
42504-
return wolfSSL_sk_pop(sk);
42504+
return (WOLFSSL_BY_DIR_entry *)wolfSSL_sk_pop(sk);
4250542505
}
4250642506
/* release all contents in stack, and then release stack itself. */
4250742507
/* Second argument is a function pointer to release resources. */

tests/api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33034,7 +33034,7 @@ static int test_wolfSSL_PKCS8_d2i(void)
3303433034
bio = NULL;
3303533035

3303633036
/* https://github.com/wolfSSL/wolfssl/issues/8610 */
33037-
bytes = (int)XSTRLEN((void*)pkcs8_buffer);
33037+
bytes = (int)XSTRLEN((char *)pkcs8_buffer);
3303833038
ExpectNotNull(bio = BIO_new_mem_buf((void*)pkcs8_buffer, bytes));
3303933039
ExpectIntEQ(BIO_get_mem_data(bio, &p), bytes);
3304033040
ExpectIntEQ(XMEMCMP(p, pkcs8_buffer, bytes), 0);

0 commit comments

Comments
 (0)