From 40de65785cd64632f31b9263e21a91ea498656b7 Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Wed, 13 May 2026 16:17:07 -0500 Subject: [PATCH] Address warning in wolfDTLS_SetChGoodCb --- src/ssl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ssl.c b/src/ssl.c index 1bf913b18f..7d3812d5f3 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -7536,6 +7536,11 @@ int wolfDTLS_accept_stateless(WOLFSSL* ssl) return ret; } +/* WC_NO_INLINE: wolfDTLS_accept_stateless passes the address of a stack-local + * context here; the restore call before return clears it again. Preventing + * inlining hides that cross-frame assignment from GCC's -Wdangling-pointer + * analysis, which otherwise flags a false positive on GCC 14+. */ +WC_NO_INLINE int wolfDTLS_SetChGoodCb(WOLFSSL* ssl, ClientHelloGoodCb cb, void* user_ctx) { WOLFSSL_ENTER("wolfDTLS_SetChGoodCb");