[zeromq-dev] zthread_fork warning
Brian Knox
briank at talksum.com
Mon Oct 22 16:26:01 CEST 2012
Aha! I was converting this program to use attached threads
(previously was using dettached) and missed that! Thank you.
Thanks,
Brian
On Mon, Oct 22, 2012 at 10:06 AM, Iverson, John Robert
<jrivers at sandia.gov> wrote:
> So I think your function should return "void", not "void *".
>
> Rob
>
> -----Original Message-----
> From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] 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
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
More information about the zeromq-dev
mailing list