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

Wojtek Meler wmeler at wp.pl
Mon Jun 22 07:26:18 PDT 2009


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.

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