Re: [Qemu-devel] [PATCH v3 2/3] crypto: avoid undefined behavior in nettle calls

2015-07-17 Thread Kevin Wolf
Am 16.07.2015 um 18:04 hat Radim Krčmář geschrieben: > Calling a function pointer that was cast from an incompatible function > results in undefined behavior. 'void *' isn't compatible with 'struct > XXX *', so we can't cast to nettle_cipher_func, but have to provide a > wrapper. (Conversion from

Re: [Qemu-devel] [PATCH v3 2/3] crypto: avoid undefined behavior in nettle calls

2015-07-17 Thread Daniel P. Berrange
On Thu, Jul 16, 2015 at 06:04:00PM +0200, Radim Krčmář wrote: > Calling a function pointer that was cast from an incompatible function > results in undefined behavior. 'void *' isn't compatible with 'struct > XXX *', so we can't cast to nettle_cipher_func, but have to provide a > wrapper. (Conver

[Qemu-devel] [PATCH v3 2/3] crypto: avoid undefined behavior in nettle calls

2015-07-16 Thread Radim Krčmář
Calling a function pointer that was cast from an incompatible function results in undefined behavior. 'void *' isn't compatible with 'struct XXX *', so we can't cast to nettle_cipher_func, but have to provide a wrapper. (Conversion from 'void *' to 'struct XXX *' might require computation, which