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

Re: [PATCH v2 0/5] cmocka: Make casting macros public


On Thursday 12 February 2015 14:11:36 Krzysztof Opasiak wrote:
> Dear Andreas and Jakub,
> 
> I'm using cmocka to wrap file system operations. Some functions,
> for example fopen() takes path as its argument. In linux path
> elements can be separated using unlimited number of slashes.
> So, for example:
> 
> /my/home/dir
> //my//////home////dir
> 
> points to the same directory and both are correct. To check
> if argument which contains path is correct we have implemented
> our own comparison function and use expect_check() macro to
> store its value. To use this macro, our function should take
> LargestIntegralType parameter. We need to cast this int to
> const char * but it causes ugly warnings:
> 
> warning: cast to pointer from integer of different size
> [-Wint-to-pointer-cast]

Thanks you very much for your contributions! The patchset needs more love :)

Can you please write a simple test case for cmocka for this? I want to see 
what you are trying to do and find the best way to fix this together.


Thanks,


	-- andreas


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


References:
[PATCH v2 0/5] cmocka: Make casting macros publicKrzysztof Opasiak <k.opasiak@xxxxxxxxxxx>