Skip to content

Commit 40de657

Browse files
committed
Address warning in wolfDTLS_SetChGoodCb
1 parent 47db354 commit 40de657

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/ssl.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7536,6 +7536,11 @@ int wolfDTLS_accept_stateless(WOLFSSL* ssl)
75367536
return ret;
75377537
}
75387538

7539+
/* WC_NO_INLINE: wolfDTLS_accept_stateless passes the address of a stack-local
7540+
* context here; the restore call before return clears it again. Preventing
7541+
* inlining hides that cross-frame assignment from GCC's -Wdangling-pointer
7542+
* analysis, which otherwise flags a false positive on GCC 14+. */
7543+
WC_NO_INLINE
75397544
int wolfDTLS_SetChGoodCb(WOLFSSL* ssl, ClientHelloGoodCb cb, void* user_ctx)
75407545
{
75417546
WOLFSSL_ENTER("wolfDTLS_SetChGoodCb");

0 commit comments

Comments
 (0)