From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] tools/kwbimage: Fix compilation warning
Date: Mon, 27 Oct 2014 17:47:15 +0100 [thread overview]
Message-ID: <544E7713.7010609@denx.de> (raw)
In-Reply-To: <20141027133446.CC665382FFB@gemini.denx.de>
Hi Wolfgang,
On 27.10.2014 14:34, Wolfgang Denk 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").
The fallback in the comment above refers to "version == -1". As the
function image_get_version() returns -1 if no VERSION string is found in
the config file. So I think the comment is quite accurate.
Thanks,
Stefan
prev parent reply other threads:[~2014-10-27 16:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-27 12:29 [U-Boot] [PATCH] tools/kwbimage: Fix compilation warning Stefan Roese
2014-10-27 12:57 ` Wolfgang Denk
2014-10-27 13:09 ` Stefan Roese
2014-10-27 13:34 ` Wolfgang Denk
2014-10-27 16:47 ` Stefan Roese [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=544E7713.7010609@denx.de \
--to=sr@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox