[Openais] [corosync trunk] add void * casts for iovecs

Steven Dake sdake at redhat.com
Mon Jun 22 07:40:39 PDT 2009


On Mon, 2009-06-22 at 16:26 +0200, Wojtek Meler wrote:
> Actually it was strange for me. Is corosync meant to work in 
> heterogeneous environments ?
> I have both sparc and x86 systems in production and wonder if they will 
> be able to talk each other.
> 
Yes.

It is designed to support cross endian and 32/64 bit, but I can't
guarantee this feature is perfect with 1.0.0 since it hasn't undergone
heavy cross endian testing.  We will publish with what we have, and if
there are bugs we will fix them reactively.

Regards
-steve

> Regards,
> Wojtek
> 
> Steven Dake pisze:
> > 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