cURL / Mailing Lists / curl-library / Single Mail


Re: SSL_CTX_callback_ctrl callback changed

From: Jamie Lokier <>
Date: Sun, 13 Nov 2005 17:15:15 +0000

Daniel Stenberg wrote:
> >openssl-0.9.7* [ssl.h] long SSL_CTX_callback_ctrl(SSL_CTX *, int,
> >void (*)());
> >
> >openssl-0.9.7* [ssl.h] long SSL_CTX_callback_ctrl(SSL_CTX *, int,
> >void (*)(void));
> (I assume you meant the second one to be 0.9.8)
> They look identical.

They're different. The first means "pointer compatible with any
function returning void, whatever arguments it takes". The second
means "pointer to function returning void and taking no arguments.".

If you pass the address of a function like `void foo (int)' to the
first one, that's fine and there are no warnings.

If you pass the same address to the second one, it will give a warning
like `warning: passing arg 3 of `SSL_CTX_callback_ctrl' from
incompatible pointer type. There is probably a good
reason for the warning - like is the function called with no arguments?

-- Jamie
Received on 2005-11-13