Re: [PATCH] gcc-3.0 warnings

From: Ion Badulescu (ionut@moisil.cs.columbia.edu)
Date: Sat Mar 24 2001 - 00:30:25 EST


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/



This archive was generated by hypermail 2b29 : Sat Mar 31 2001 - 21:00:09 EST