Re: compiler warnings

2005-03-08 Thread Jan Kratochvil
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 clar

Re: compiler warnings

2005-03-08 Thread Chet Ramey
> When compiling bash with GCC there are a number of alarming-looking > warnings, and several of them could be avoided by minor changes to the > code. For example: > > bashline.c:2976: warning: suggest parentheses around assignment used > as truth value > > for (passc = 0; c = string[i]; i++)