[Openais] [corosync trunk] add void * casts for iovecs
Steven Dake
sdake at redhat.com
Mon Jun 22 07:12:42 PDT 2009
Wojtek
I didn't recast these because the code there is defective. I'll need to
sort through how to fix it soon. What is assigned is a length (to an
address pointer). This isn't correct.
Regards
-steve
On Mon, 2009-06-22 at 09:53 +0200, Wojtek Meler wrote:
> Steven Dake pisze:
> > Many iovecs are missing (const *) casts which results in lots of
> > warnings on various compilers.
> >
> > This patch fixes that problem.
> >
>
> Two more casts missing.
>
> Regards,
> Wojtek
> plain text document attachment (2_more_void_casts.patch)
> Index: exec/totempg.c
> ===================================================================
> --- exec/totempg.c (revision 2280)
> +++ exec/totempg.c (working copy)
> @@ -1111,7 +1111,7 @@
> iovec_mcast[i + 1].iov_base = (void *) instance->groups[i].group;
> }
> iovec_mcast[0].iov_len = (instance->groups_cnt + 1) * sizeof (unsigned short);
> - iovec_mcast[0].iov_base = group_len;
> + iovec_mcast[0].iov_base = (void *) group_len;
> for (i = 0; i < iov_len; i++) {
> iovec_mcast[i + instance->groups_cnt + 1].iov_len = iovec[i].iov_len;
> iovec_mcast[i + instance->groups_cnt + 1].iov_base = iovec[i].iov_base;
> @@ -1207,7 +1207,7 @@
> iovec_mcast[i + 1].iov_base = (void *) groups[i].group;
> }
> iovec_mcast[0].iov_len = (groups_cnt + 1) * sizeof (unsigned short);
> - iovec_mcast[0].iov_base = group_len;
> + iovec_mcast[0].iov_base = (void *) group_len;
> for (i = 0; i < iov_len; i++) {
> iovec_mcast[i + groups_cnt + 1].iov_len = iovec[i].iov_len;
> iovec_mcast[i + groups_cnt + 1].iov_base = iovec[i].iov_base;
More information about the Openais
mailing list