So I think your function should return "void", not "void *".
Rob -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Brian Knox Sent: Monday, October 22, 2012 7:55 AM To: ZeroMQ development list Subject: [zeromq-dev] zthread_fork warning I'm getting a warning using zthread_fork in code that works and I'm trying to track down the source of my warning. I'm passing the result of the zthread_fork call to a struct member. Here's the details: My function header: static void * clock_thread (void *args, zctx_t *ctx, void *pipe) My zthread_fork call: self->zmq_clock_pipe = zthread_fork(ctx, clock_thread, NULL); In my struct, zmq_clock pipe is: void *zmq_clock_pipe Everything functions when I spin up the code - I just get this warning and I want to make sure I haven't done something obviously silly. Here's the error: warning: passing argument 2 of 'zthread_fork' from incompatible pointer type /usr/local/include/zthread.h:52: note: expected 'void (*)(void *, struct zctx_t *, void *)' but argument is of type 'void * (*)(void *, struct zctx_t *, void *)' Thanks, Brian _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
