Evan Laforge wrote: > On Fri, May 27, 2011 at 3:55 AM, Albrecht Schlosser > <ajs856s...@go4more.de> wrote: >> On 27.05.2011 10:43, MacArthur, Ian (SELEX GALILEO, UK) wrote: >> >>> As I was reviewing the recent commits, I was looking at this line of >>> code: >>> >>> + if (num_screens> 0&& n>= 0&& n< num_screens&& screens) { >> [...] >> >>> It's not just me - recent versions of gcc whine on about this too!
>> Really? I can only remember having seen gcc warnings if you combine >> '&&' and '||' (where '&&' takes precedence over '||' anyway, and >> we "fixed" all *these* warnings already). I think Ian's remembering this thread: http://www.mail-archive.com/fltk-dev@easysw.com/msg05736.html ..the main issue being a line like this, which the compiler warned us to add parens: char al = (scrollbar.align()&FL_ALIGN_LEFT!=0); ..where the '&' took precedence over != which the compiler treated as: char al = (scrollbar.align()&(FL_ALIGN_LEFT!=0)); ..but the intention of the code seemed to instead be: char al = ((scrollbar.align()&FL_ALIGN_LEFT) != 0); _______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev