[U-Boot] [PATCH] tools/kwbimage: Fix compilation warning

Wolfgang Denk wd at denx.de
Mon Oct 27 14:34:46 CET 2014


Dear Stefan,

In message <544E4412.60603 at denx.de> you wrote:
> 
> >> +	switch (version) {
> >> +		/*
> >> +		 * Fallback to version 0 is no version is provided in the
> >> +		 * cfg file
> >> +		 */
> >> +	case -1:
...

> > What exactly is the difference between return code -1 (no version is
> > provided and you fall back to using version 0), and the default case?
> >
> > To me these look the same?
> 
> Perhaps the error message is a bit misleading. The "default:" case is 
> for unsupported versions. E.g. if "VERSION 3" would have been provided 
> in the cfg file.
> 
> Should I rephrase the error message in the next patch version? To 
> something like this:

In this case not the error message is incorrect, but the comment
above is misleading.  Instead of "no version is provided" it should
probably read "if no supported version is provided" (note: please
also fix the typo, i.e. "if" instead of "is").

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Anything free is worth what you pay for it.


More information about the U-Boot mailing list