> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Trawick > Sent: 25 March 2002 14:05
> "Sander Striker" <[EMAIL PROTECTED]> writes: > > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > > Sent: 22 March 2002 21:37 > > > > > trawick 02/03/22 12:37:04 > > > > > > Modified: modules/http http_protocol.c > > > Log: > > > add an extra level of parentheses to say "yes I know what I'm > > > doing with that single '='" and more importantly to quiet a > > > gcc -Wall warning > > > > Please put the comment in the code Bit of a bogus suggestion from my side since I prefer not to have long comments when it can be expressed in 4 extra characters. > > or make it explicit that you are > > testing for != 0. The extra braces are bound to be removed by some > > overactive style nitter ;) > > Nope. Style nitters better pay attention to gcc -Wall to avoid doing > anything stupid. True. > (Actually everybody should. I can't believe how > freakin' lazy some people are.) Unfortunately true as well. This also goes for running the test suite. > The only time I feel the need to put a comment in the code to describe > a change to clean up warnings is when an incorrect "foo is used before > set" warning is cleared up by initializing the variable. It is not about cleaning up the warning, which is a good thing. It is about making it more readable. if ((a = b)) is less obvious as if ((a = b) != 0) I was kind of hoping you would be able to detect the joking tone I was trying to use in the last sentence. What I probably should have done is make it explicit that IMO being explicit is the better way to go about this; especially from a review point of view. > Jeff Trawick Sander