* Andrew Morton <[email protected]> wrote:
> On Fri, 28 Sep 2007 10:40:03 +0200 Ingo Molnar <[email protected]> wrote:
>
> > i ran it over kernel/sched.c and there are many bogus warnings that i
> > reported to you earlier:
> >
> > WARNING: multiple assignments should be avoided
> > #2319:
> > + max_load = this_load = total_load = total_pwr = 0;
>
> That warning is non-bogus, although this is one of the bogosities
> which I personally don't bother fixing or making a fuss about.
>
> But I do think it detracts from the readability of the code, and from
> patches which later alter that code. A bit.
well, the two variants is:
max_load = this_load = total_load = total_pwr = 0;
max_load = 0;
this_load = 0;
total_load = 0;
total_pwr = 0;
and the first one is more readable and more compact. (as long as the
conceptual 'type' of the variables is the same - which it is in this
case.)
anyway, this is something where reasonable people might disagree, and a
tool should not force it one way or another. And this is the second time
i raised this very example and Andy ignored my feedback and failed to
notice the structural problem behind it (that a tool should only warn by
default if it is _sure_ that there is a problem - otherwise the tool
cannot be used for effective [i.e. automated] quality control), so i'm
raising this point again, in a slightly more irritated tone ;-)
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]