[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 4/5] cmocka: Use cast_ptr_to_largest_integral_type in suitable places


On Friday 13 February 2015 11:40:54 Krzysztof Opasiak wrote:
> > -----Original Message-----
> > From: Andreas Schneider [mailto:asn@xxxxxxxxxxxxxx]
> > Sent: Friday, February 13, 2015 9:27 AM
> > To: Krzysztof Opasiak
> > Cc: jakub.hrozek@xxxxxxxxx; cmocka@xxxxxxxxxxxxxx;
> > p.szewczyk@xxxxxxxxxxx; s.wadas@xxxxxxxxxxx
> > Subject: Re: [PATCH v2 4/5] cmocka: Use
> > cast_ptr_to_largest_integral_type in suitable places
> > 
> > On Thursday 12 February 2015 14:11:40 Krzysztof Opasiak wrote:
> > > Replace cast_to_largest_integral_type() with its ptr
> > > versions in macros which are supposed to take pointer
> > > as their parameter.
> > 
> > I don't really see what you are trying to fix here. I think the
> > patch is
> > wrong. Can you please create a test case which shows the issue
> > you're trying
> > to solve?
> 
> I had some ugly warnings from cmocka examples about casting
> From pointer to integer of different size but after your commit:
> 
> f02f7357187e9b80da1dd7539333bc0c3a134987
> include: Fix pointer casting and add check_expected_ptr()
> 
> Everything is compiling properly.

Thanks. Yes, there were some things which were not correct. I fixed some 
mistakes in the macros. If there is still something wrong then we need to add 
tests to make sure it works in future too.

cmokca is a fork of cmockery. The job they did at cmockery to write test cases 
was not very good ;)

Cheers,


	-- andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@xxxxxxxxxxxxxx