Re: [PATCH MISC 1/1] Make gcc warning about empty if body go away.
- From
Andreas Ericsson <ae@op5.se>
- Date
- Nov 8, 2007, 15:47 UTC
- Message-ID
- <47332F8E.8080309@op5.se>
- In-Reply-To
- <47332957.5050308@freescale.com>
Jon Loeliger wrote:
Show 25 quoted lines
> Andreas Ericsson wrote: > >>> + if (active_cache_changed && >>> + !write_cache(fd, active_cache, active_nr) && !close(fd)) >>> + commit_locked_index(lock_file); >>> rollback_lock_file(lock_file); >>> } >>> >> >> Ack, obviously, as it no longer requires a comment to explain it, >> although >> I'd prefer an empty line after commit_locked_index(lock_file); so as >> to not >> confuse the rollback_lock_file() statement as being part of the >> conditional >> path. >> >> First I thought the rollback_lock_file() was the *only* statement to the >> condition, and everyone who uses 4 for tabsize) will have double trouble >> since commit_locked_index(lock_file) aligns with the second line of the >> condition. >> > > It's too bad this was confusing due to the lack of braces. :-) >
I found that slightly ironic too, since I really don't like overly bracey code either. Just goes to show there are no rules without exceptions, I guess.
-- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231