Hello Seth,

Seth Robertson via RT wrote:
We use the following gcc flags for our internal programs

----------------------------------------------------------------------
-Wmissing-prototypes -Wcomment -Wformat -Wimplicit -Wmain -Wmultichar
-Wswitch -Wshadow -Wtrigraphs -Werror -Wchar-subscripts
-Wstrict-prototypes  -Wreturn-type -Wpointer-arith  -W -Wunused
-Wno-unused-parameter -Wuninitialized
----------------------------------------------------------------------
[...]

In addition, there were a few cases where I could not find user of
some function pointers, so I used (void), but it is possible I just
missed some.  After I ran into too many of the pointer problems above,
I gave up checking the incompatible pointers to find if I missed more.

Some of the functions define an interface for other functions to use and to implement.

Especially the xxx_ctrl() functions.

Most of them have the interface:

int XX_ctrl(XX *xx, int cmd, long i, void *p, void (*f)());

the params are:
xx:  the pointer to the "object" to manipulate
cmd: a numeric value that selects the command to use
i:   data specific for the command cmd: a numeric (integer) value
p:   data specific for the command cmd: a pointer to any data
     this can be a const char* (e g: a file name for certificates,...)
f:   data specific for the command cmd: a pointer to any function.
     this can be a void f(void), a int f(int,int,int),
     a int f(int, char, int),...
     (e g: callback function to get a passphrase,...)

there is no way to set the params for such a function
perhaps void f(...) ?

Bye

Goetz

--
Goetz Babin-Ebell, TC TrustCenter AG, http://www.trustcenter.de
Sonninstr. 24-28, 20097 Hamburg, Germany
Tel.: +49-(0)40 80 80 26 -0,  Fax: +49-(0)40 80 80 26 -126

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Reply via email to