From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] env: suppress a spurious warning with GCC 7.1
Date: Thu, 30 Nov 2017 10:36:21 -0500 [thread overview]
Message-ID: <20171130153621.GD3587@bill-the-cat> (raw)
In-Reply-To: <1511303381-57205-1-git-send-email-philipp.tomsich@theobroma-systems.com>
On Tue, Nov 21, 2017 at 11:29:40PM +0100, Philipp Tomsich wrote:
> GCC 7.1 seems to be smart enough to track val through the various
> static inline functions, but not smart enough to see that val will
> always be initialised when no error is returned. This triggers
> the following warning:
> env/mmc.c: In function 'mmc_get_env_addr':
> env/mmc.c:121:12: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> To make it easier for compiler to understand what is going on, let's
> initialise val.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
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: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171130/311a37cb/attachment.sig>
prev parent reply other threads:[~2017-11-30 15:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 22:29 [U-Boot] [PATCH] env: suppress a spurious warning with GCC 7.1 Philipp Tomsich
2017-11-24 22:36 ` Simon Glass
2017-11-30 15:36 ` 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=20171130153621.GD3587@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.