Am 05.03.2010 12:03, MacArthur, Ian (SELEX GALILEO, UK) wrote:

>> Flags flags = ((this->flags()&(~(STATE|PUSHED|HIGHLIGHT)))|OUTPUT);
>>
>> ... to make it _absolutely_ clear. ((((useless spaces removed
>> intentionally))))  ;-P
>
> I like the spaces, though... A little whitespace[1] breaks up the line
> nicely and aids readability I always think.

Me too. You noticed the smiley, didn't you? Maybe I should have written
<sarcasm on>...<sarcasm off>. I really don't know how we should proceed
with these warnings. If you find only one bug, then they might have
done a good job, but otherwise you'll get more and more parentheses,
and I read a comment somewhere that this would make the code unreadable.
Maybe that's correct to some degree.

Other warnings may be more useful, though:

Fl_Preferences.cxx:684: warning: suggest explicit braces to avoid 
ambiguous 'else'

Fl_Text_Buffer.cxx:1346: warning: array subscript has type 'char'

Fl_x.cxx:354: warning: deprecated conversion from string constant to 'char*'
Fl_x.cxx:468: warning: deprecated conversion from string constant to 'char*'

These were with gcc 4.x on Windows, but on Linux there are some more
like:

Fl_File_Chooser2.cxx: In member function ‘void 
Fl_File_Chooser::fileNameCB()’:
Fl_File_Chooser2.cxx:864: warning: format not a string literal and no 
format arguments
Fl_File_Chooser2.cxx: In member function ‘void Fl_File_Chooser::newdir()’:
Fl_File_Chooser2.cxx:1052: warning: format not a string literal and no 
format arguments
Fl_File_Chooser2.cxx: In member function ‘void 
Fl_File_Chooser::showChoiceCB()’:
Fl_File_Chooser2.cxx:1219: warning: format not a string literal and no 
format arguments

This can be a problem if the argument (format) contains '%' characters
that are meant to be literal characters.

We should discuss this probably in fltk.development.

Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to