Skip to content

Commit c5fb83f

Browse files
fix warnings for g++ build with async
1 parent 59f4fa5 commit c5fb83f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tls.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ int BuildTlsFinished(WOLFSSL* ssl, Hashes* hashes, const byte* sender)
175175
byte handshake_hash[HSHASH_SZ];
176176
#else
177177
byte* handshake_hash = NULL;
178-
handshake_hash = XMALLOC(HSHASH_SZ, ssl->heap, DYNAMIC_TYPE_DIGEST);
178+
handshake_hash = (byte*)XMALLOC(HSHASH_SZ, ssl->heap, DYNAMIC_TYPE_DIGEST);
179179
if (handshake_hash == NULL)
180180
return MEMORY_E;
181181
#endif
@@ -404,7 +404,7 @@ static int _DeriveTlsKeys(byte* key_dig, word32 key_dig_len,
404404
int ret;
405405
#if defined(WOLFSSL_ASYNC_CRYPT) && !defined(WC_ASYNC_NO_HASH)
406406
byte* seed = NULL;
407-
seed = XMALLOC(SEED_LEN, heap, DYNAMIC_TYPE_SEED);
407+
seed = (byte*)XMALLOC(SEED_LEN, heap, DYNAMIC_TYPE_SEED);
408408
if (seed == NULL)
409409
return MEMORY_E;
410410
#else
@@ -504,7 +504,7 @@ static int _MakeTlsMasterSecret(byte* ms, word32 msLen,
504504
byte seed[SEED_LEN];
505505
#else
506506
byte* seed = NULL;
507-
seed = XMALLOC(SEED_LEN, heap, DYNAMIC_TYPE_SEED);
507+
seed = (byte*)XMALLOC(SEED_LEN, heap, DYNAMIC_TYPE_SEED);
508508
if (seed == NULL)
509509
return MEMORY_E;
510510
#endif

0 commit comments

Comments
 (0)