From fb832e1e525ce41c02ab1b08c468309825e5e5e5 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Thu, 11 Sep 2025 15:32:59 +0200 Subject: [PATCH] BUILD: ssl: functions defined but not used Previous patch 50d191b ("MINOR: ssl: set functions as static when no protypes in the .h") broke the WolfSSL function with unused functions. This patch add __maybe_unused to ssl_sock_sctl_parse_cbk(), ssl_sock_sctl_add_cbk() and ssl_sock_msgcbk() --- src/ssl_sock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 34bb1e952..ecaf24ee9 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -1569,7 +1569,7 @@ static int ssl_sock_load_ocsp(const char *path, SSL_CTX *ctx, struct ckch_data * int sctl_ex_index = -1; -static int ssl_sock_sctl_add_cbk(SSL *ssl, unsigned ext_type, const unsigned char **out, size_t *outlen, int *al, void *add_arg) +static __maybe_unused int ssl_sock_sctl_add_cbk(SSL *ssl, unsigned ext_type, const unsigned char **out, size_t *outlen, int *al, void *add_arg) { struct buffer *sctl = add_arg; @@ -1579,7 +1579,7 @@ static int ssl_sock_sctl_add_cbk(SSL *ssl, unsigned ext_type, const unsigned cha return 1; } -static int ssl_sock_sctl_parse_cbk(SSL *s, unsigned int ext_type, const unsigned char *in, size_t inlen, int *al, void *parse_arg) +static __maybe_unused int ssl_sock_sctl_parse_cbk(SSL *s, unsigned int ext_type, const unsigned char *in, size_t inlen, int *al, void *parse_arg) { return 1; } @@ -2104,7 +2104,7 @@ static void ssl_init_keylog(struct connection *conn, int write_p, int version, #endif /* Callback is called for ssl protocol analyse */ -static void ssl_sock_msgcbk(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg) +static __maybe_unused void ssl_sock_msgcbk(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg) { struct connection *conn = ssl_sock_get_conn(ssl, NULL); struct ssl_sock_msg_callback *cbk;