From: Richard R. <sf...@ol...> - 2003-12-02 15:40:03
|
On Tue, Dec 02, 2003 at 03:23:22PM +0000, Chris Purnell wrote: > On Mon, Dec 01, 2003 at 10:53:32AM -0600, Fay John F Contr AAC/WMG wrote: > > > (2) In "freeglut_callbacks.c" please change lines 102 and 108 to remove > > extraneous parentheses and insert explicit type casts: > > The extraneous parentheses are there to stop gcc giving the warning > "suggest parentheses around assignment used as truth value". <rant> ...a warning which I wish gcc would drop. (Because I never put lvalues on the left of "==" compares, the only problem that this addresses is carlessly typing "=" instead of "==". A minor style adjustment promotes that typo to a syntax error. gcc's warning about perfectly valid---and often desirable---C constructs is one of the faults that I find with gcc.) </rant> (^& As for the casts, I'd not write extraneous casts in the first place, but am a little depleted from my style campaign of November to get much enthusiasm over the subject in December. -- "I probably don't know what I'm talking about." http://www.olib.org/~rkr/ |