Re: [PATCH] 2.4.19 warnings cleanup

From: bill davidsen (
Date: Tue Aug 06 2002 - 21:07:42 EST

In article <>,
David S. Miller <> wrote:

| A compiler isn't able to work out the control flow which
| makes sure ret is indeed initialized on every path to
| a use. Solving such a problem is traveling salesman'ish :-)

This is true, but on the other hand I don't see much virtue in taking
the attitude that I'm sure the compiler is wrong to avoid the overhead
of initializing the variable or clarifying the code.

I totally agree that there are cases in which the compiler can't be sure
and the programmer is based on some outside assumptions of input values
or whatever, but I don't mind making the code robust in cases other than
innermost loops where I just can't fix it.

I'd rather set the initial value to NOTSET or NULL or some value which
will clearly show if you are setting what you think you are. I've
occasionally been surprised, particularly when trusting values passed
into a procedure.

Just my take on reliable vs. fast.

bill davidsen <>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:34 EST