From: Ville S. <vil...@ik...> - 2012-09-08 09:00:13
|
On 2012-08-30 05:32, Andrew Church wrote: >> How weird that you should get a complaint about this line ... >> >>> - return (va->vd.vformat || default_video_format) == VF_PAL ? VR_PAL : VR_NTSC; >> >> ... but not this one, above it: >> >>> else if (va->vd.vformat || default_video_format) > > I suspect the warning is not about the || operation itself, but rather > about comparing its result to VF_PAL in the first line. Yeah, I don't think there's anything wrong with the latter, it's just a boolean comparison. In the former however as (va->vd.vformat || default_video_format) will only ever result in value of 0 or 1 (a boolean) it'll never be == VF_PAL (which is 2), so the returned value will always be VR_NTSC. |