Commit ba5e39ac by Patrick Steinhardt

streams: openssl: fix bogus warning on unused parameter

Our provided callback function `threadid_cb(CRYPTO_THREADID
*threadid)` sets up a unique thread ID by asking pthread for the
current thread ID.  Since openssl version 1.1,
`CRYPTO_THREADID_set_numeric` is simply a no-op macro, leaving
the `threadid` argument unused after the preprocessor has
processed the macro. GCC does not account for that situation and
will thus complain about `threadid` being unused.

Silence this warning by using `GIT_UNUSED(threadid)`.
parent 26a09a93
......@@ -252,7 +252,8 @@ int git_openssl_stream_global_init(void)
#if defined(GIT_THREADS)
static void threadid_cb(CRYPTO_THREADID *threadid)
{
CRYPTO_THREADID_set_numeric(threadid, git_thread_currentid());
GIT_UNUSED(threadid);
CRYPTO_THREADID_set_numeric(threadid, git_thread_currentid());
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment