]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl: functions defined but not used
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 11 Sep 2025 13:32:59 +0000 (15:32 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 11 Sep 2025 13:32:59 +0000 (15:32 +0200)
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

index 34bb1e95268f6fafe7af4da6ad78703b1b5fdf88..ecaf24ee955ce7b7e5596bb9f1c63c77180000b3 100644 (file)
@@ -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;