From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] cmd: disk: Fix unused variable warning
Date: Mon, 30 May 2016 13:56:16 -0400 [thread overview]
Message-ID: <20160530175616.GH7419@bill-the-cat> (raw)
In-Reply-To: <1462055754-6357-1-git-send-email-marex@denx.de>
On Sun, May 01, 2016 at 12:35:54AM +0200, Marek Vasut wrote:
> If serial support is not compiled into U-Boot, which may be the case
> for some SPL builds, the following warning will be generated in disk.c:
>
> cmd/disk.c: In function 'common_diskboot':
> cmd/disk.c:16:6: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
> int dev, part;
> ^
> The warning is a result of printf() calls being optimized away, and
> thus the whole dev variable becomes indeed unused. Mark the variable
> as __maybe_unused .
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160530/fbc3c74c/attachment.sig>
prev parent reply other threads:[~2016-05-30 17:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-30 22:35 [U-Boot] [PATCH] cmd: disk: Fix unused variable warning Marek Vasut
2016-05-01 18:55 ` Simon Glass
2016-05-02 23:31 ` Tom Rini
2016-05-30 17:56 ` Tom Rini [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=20160530175616.GH7419@bill-the-cat \
--to=trini@konsulko.com \
--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