Re: [PATCH] gcc-3.0 warnings

Ion Badulescu (ionut@moisil.cs.columbia.edu)
Fri, 23 Mar 2001 21:30:25 -0800


On Fri, 23 Mar 2001 23:59:09 +0100, J . A . Magallon <jamagallon@able.es> wrote:
>
>
> On 03.23 Linus Torvalds wrote:
>>
>> I agree. I'd much prefer that syntax also.
>>
>> Or just remove the "default:" altogether, when it doesn't make any
>> difference.
>>
>
> Well, at last some sense. The same is with that ugly out: at the end
> of the function. Just change all that 'goto out' for a return.

No, no. Hell no. Multiple return paths in a function are a sure recipe
for errors creeping in later.

Just change the
out:;
into
out:
return;
and be done with it. Heck, it even looks like C code for a change. :-)

Ion

-- 
  It is better to keep your mouth shut and be thought a fool,
            than to open it and remove all doubt.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/