On 11/04/2015 09:52 AM, Dominique Leuenberger / DimStar wrote:
On Wed, 2015-11-04 at 09:01 +0100, Takashi Iwai wrote:
It is OK if it's cast. The returned value itself is same, just a different expression.
Returning a boolean FALSE (0) won't cause an issue - but TRUE? That translates to '1'.
So in fact, you return a pointer on the address 0x1 and hope to get anything useful from there when accessing it.
Sounds in most cases very fatal.
The check is about 64bit portability. If you return (int)1 to a pointer, then the 32 bit int value will be assigned to either the lower or higher part of the 64-bit pointer adress, maybe leaving alone the other part. I think this is what the check is complaining about. At least I've seen programs running wild for such a reason when porting software to 64bit several years ago. Have a nice day, Berny -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org