]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: ssl: silence a build warning when threads are disabled
authorWilly Tarreau <w@1wt.eu>
Fri, 1 May 2020 09:38:39 +0000 (11:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 May 2020 09:41:36 +0000 (11:41 +0200)
commita6cd078f756838b819b199950dcb4a2a27a9761d
tree378713ee1284df820f5d8ea2cf6c8e3b846214a2
parenta911548715999c5d0b4eccdb026a119d4817b960
CLEANUP: ssl: silence a build warning when threads are disabled

Building without threads now shows this warning:

src/ssl_sock.c: In function 'cli_io_handler_commit_cert':
src/ssl_sock.c:12121:24: warning: unused variable 'bind_conf' [-Wunused-variable]
      struct bind_conf *bind_conf = ckchi->bind_conf;
                        ^~~~~~~~~

This is because the variable is needed only to unlock the structure, and
the unlock operation does nothing in this case. Let's mark the variable
__maybe_unused for this, but it would be convenient in the long term if
we could make the thread macros pretend they consume the argument so that
this remains less visible outside.

No backport is needed.
src/ssl_sock.c