[U-Boot-Users] [PATCH] smc91111.c gcc-3.3.3 warning fix

Woodruff, Richard r-woodruff2 at ti.com
Wed Jun 16 19:15:43 CEST 2004


goto's while ugly do have a good usage in error unwinding.  Most of the
C tomes say this and I agree... I didn't look closely at this specific
situation in the 91111 and all of it's context, but from the patch it
appeared to be an error path.

Leaving with a return may be the cleaner thing to do here.  Removing
goto's is generally good, but I wouldn't go out of my way to recode in
instances when they are the most efficient way to go.

Regards,
Richard W.
> -----Original Message-----
> From: Ladislav Michl [mailto:ladis at linux-mips.org]
> Sent: Wednesday, June 16, 2004 11:05 AM
> To: Woodruff, Richard
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] [PATCH] smc91111.c gcc-3.3.3 warning fix
> 
> On Wed, Jun 16, 2004 at 10:05:14AM -0500, Woodruff, Richard wrote:
> > Even toward the more trivial, I believe that Wolfgang or someone
pointed
> > out before that adding a ';' after the target goto label will also
> > remove the warning.
> >
> > Regards,
> > Richard W.
> 
> Right, but I'm still considering such usage of goto ugly as hell.
> 
> 	ladis




More information about the U-Boot mailing list