[Spice-devel] [PATCH spice-common 1/2] Fix demarshaller code generator

Eduardo Lima (Etrunko) etrunko at redhat.com
Thu May 17 17:40:39 UTC 2018


On 17/05/18 14:08, Frediano Ziglio wrote:
>>
>> Even though commit df4ec5c3186e796624e4bbf2dc4a269faf2823f6 commented
>> out most of smartcard code which triggered this error, it still might
>> happen if a new message is added with an array member.
>>
>> The reason is a missing declaration of mem_size, which is fixed simply
>> by checking if the attribute 'nocopy' is present.
>>
>> The error log follows:
>>
>> generated_server_demarshallers.c: In function
>> ‘parse_msgc_smartcard_reader_add’:
>> generated_server_demarshallers.c:1985:30: error: ‘mem_size’ undeclared (first
>> use in this function); did you mean ‘nw_size’?
>>      data = (uint8_t *)malloc(mem_size);
>>                               ^~~~~~~~
>>                               nw_size
>>
>> Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
> 
> Acked-by: Frediano Ziglio <fziglio at redhat.com>
> 
> Would be great to have a test for this.
> Maybe extending test-marshaller ?

Sure, I will send a v2 with the changes.


-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko at redhat.com


More information about the Spice-devel mailing list