Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.bin/make



On Feb 18, 10:09pm, david%l8s.co.uk@localhost (David Laight) wrote:
-- Subject: Re: CVS commit: src/usr.bin/make

| On Mon, Feb 18, 2008 at 10:52:17AM +1100, Simon Burge wrote:
| > Christos Zoulas wrote:
| > 
| > > On Feb 16,  2:53pm, david%l8s.co.uk@localhost (David Laight) wrote:
| > >
| > > | I'm also not sure that adding 'integer type' casts on function calls
| > > | improves the readability or buglessness of code - indeed since they
| > > | can hide bugs (eg actual variable is a pointer) they may hide real bugs.
| > > | Adding (void) to functions whose value is ignored also just makes
| > > | code harder to read.
| > > 
| > > This is part of style.
| > 
| > Might it be time to change this part of style?  To me those (void) also
| > just make the code harder to read...
| 
| For fprintf() it would almost be worth warning about code that does
| test the return value!
| Since many stdio write errors can't be detected until the buffer is
| flushed, and that happens during fclose(), detecting write errors
| requires that you call fflush() and then check ferror() - espcially
| just prior to fclose().

Heh! But there is setvbuf() to change that behavior.

christos


Home | Main Index | Thread Index | Old Index