[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compiler warnings
From: |
Jan Kratochvil |
Subject: |
Re: compiler warnings |
Date: |
Wed, 9 Mar 2005 00:16:31 +0100 |
User-agent: |
Mutt/1.4.1i |
Hi,
On Tue, 08 Mar 2005 16:31:15 +0100, Chet Ramey wrote:
...
> > for (passc = 0; c = string[i]; i++)
> >
> > This could more readably be written:
> >
> > for (passc = 0; (c = string[i]) != '\0'; i++)
...
> No, the former is my preferred style. The latter is less readable and
> reduces clarity.
What about some compromise:
for (passc = 0; (c = string[i]); i++)
If you use the first style you do need to always use -Wno-parentheses .
It has also further implications which may not be wised. :-?
Regards,
Lace