4 Nov
2015
4 Nov
'15
12:31
On Wed, 04 Nov 2015, 12:14:38 +0100, Takashi Iwai wrote: [...]
You can find tons of codes passing TRUE or any other integer value as a pointer in GNOME.
while this is true, it doesn't necessarily mean this is good code of practice. Please remember, TRUE can be defined taking arbitrarily many possible values, it just must not be 0.
Of course, they have usually explicit cast for avoiding the warning message.
Nope, the cast just hides the potential bug. The code is bad! If they want to use TRUE as a pointer, something is wrong in their programming logic.
Takashi
Cheers. l8er manfred